Algorithm/프로그래머스
[Lv.0/Python] 문자열 바꿔서 찾기
chocoji
2023. 7. 25. 23:46
🔗 문제
https://school.programmers.co.kr/learn/courses/30/lessons/181864
💻 Code
def solution(myString, pat):
result = myString.replace("A", "X").replace("B", "A").replace("X", "B")
return int(pat in result)