Advertisement
AlexG2230954

Untitled

May 14th, 2022
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. num = input()
  2.  
  3. if num.count("6"):
  4.     print(num.replace("6", "9", 1))
  5. else:
  6.     print(num[::-1].replace("9", "6", 1)[::-1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement