Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = input()
- if num.count("6"):
- print(num.replace("6", "9", 1))
- else:
- print(num[::-1].replace("9", "6", 1)[::-1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement