Full name
ascii
Library
Built-in
Syntax
ascii(object)
Description
The ascii function returns a string containing a printable representation of an object.
Parameters
- object: object to be converted to a printable version.
Examples
If the object is a text string, the function "escapes" the non-ascii characters:
The object can be an iterable like a list:
print(ascii ([1, 2, "€"]))