NIKOLAY_TETUS

Untitled

Jun 11th, 2021
1,182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. string = "2" * 20 + "3" * 15 + "4" * 10
  2. print(string)
  3.  
  4. while string.find("42") or string.find("32"):
  5.     if (string.find("42")):
  6.         string.replace("42", "51", 1)
  7.     else:
  8.         string.replace("32", "61", 1)
  9.  
  10. print(string)
Advertisement
Add Comment
Please, Sign In to add comment