Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ДЗ на 21.02. Задание 6
- A = input()
- while ("772" in A) or ("557" in A):
- if "722" in A:
- A = A.replace("722", "57", 1)
- else:
- A = A.replace("557", "72")
- print(A)
- # В задании | В Python
- # ----------------------------------------
- # заменить(a, b) | A = A.replace(a, b, 1)
- # нашлось(a) | a in A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement