Python ascii() Function Syntax
Syntax: ascii(object)
- object: Any Python object (ex.: string, int, list, tuple, set, etc.)
Returns: Returns a string as a printable representation of the object passed, escaping the non-ASCII characters.
The method can take only one parameter, an object that can be a list, strings, etc. As already discussed, it returns a printable representation of an object.
ascii() in Python
In Python, we have ascii() function that returns a string containing a printable representation of an object. In this article, we will see about ascii() in Python.