Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string = input()
- array = list(string)
- e = 0
- while True:
- if len(array) == e:
- break
- if array[e] == "A" :
- array[e] = array[e].replace("A","B")
- e += 1
- continue
- if array[e] == "B":
- array[e] = array[e].replace("B","A")
- e += 1
- print("".join(array))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement