Advertisement
DaniDori

9365

Dec 10th, 2023
724
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. s = '8' * 68
  2. while '222' in s or '888' in s:
  3.     if '222' in s:
  4.         s = s.replace("222", '8', 1)
  5.     else:
  6.         s = s.replace("888", '2', 1)
  7. print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement