Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ascii() returns a string containing a printable representation of an object and escape the non-ASCII characters in the string using \x, \u or \U escapes.
ascii("¥")
#Output : '\xa5'
ascii("µ")
#Output : '\xb5'
ascii("Ë")
#Output : '\xcb'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment