Advertisement
ihor_ks

name_ucp.py

Nov 19th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. #!/usr/bin/python3
  2.  
  3. """
  4. This program converts a username into unicode code points.
  5. For example: Тарас → '422430440430441'
  6. """
  7.  
  8. name_string = input("Hello, what is your name?\n > ")
  9.  
  10. name_ucp = ""
  11.  
  12. for letter in name_string:
  13.     name_ucp += "{:04x}".format(ord(letter))[1:]
  14.  
  15. print(f"Your name in unicode code points: {name_ucp}\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement