Home >>Python Built-in Functions >Python ascii() Function
Python ascii() function is used to return a readable version of any given input object like Strings, Tuples, Lists, etc. It replaces any non-ascii characters with escape characters å will be replaced with \xe5.
Syntax:ascii(object)
Parameter | Description |
---|---|
object | This parameter contains This parameter contains An object, like String, List, Tuple, Dictionary etc. |
x = ascii("Hi! I am JERR¥") print(x)
x = ascii("© Copyright") print(x)