Python ascii() FunctionThe python ascii() function returns a string containing a printable representation of an object and escapes the non-ASCII characters in the string using \x, \u or \U escapes. SignatureParametersobject: It takes an object like strings, list etc. ReturnIt returns a readable version of an object and replaces none-ascii characters with the escape character. Python ascii() Function Example 1Let's see how ascii() works for lists? Output: 'Python is interesting' 'Pyth\xf6n is interesting' Pyth�n is interesting Explanation: In the above example, variables such as normalText, and otherText contain the string values, and returns ascii value of a particular variable. Next TopicPython Functions |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India