Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- str_text = 46 * "1" + 46 * "2"
- while str_text.find("111") != -1:
- str_text = str_text.replace('111', '2', 1)
- str_text = str_text.replace('222', '1', 1)
- print(str_text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement