A method can only take one parameter, an object which can be a list, strings, etc. As discussed, it returns a printable representation of the object.
Input: ascii ("¥") Output: 'xa5' Input: ascii (" µ ") Output:' xb5' Input: ascii ("Ë") Output: ' xcb'
We can see that in these examples all non-ASCII characters have been escaped, i.e. the encoded code is displayed using the ascii () method.
'G xeb xea ksf u03b8 r G u03b5 eks'
This article courtesy of Chinma Lenka . If you are as Python.Engineering and would like to contribute, you can also write an article using contribute.python.engineering or by posting an article contribute @ python.engineering. See my article appearing on the Python.Engineering homepage and help other geeks.
Please write in comments if you find anything wrong or if you'd like to share more information on the topic discussed above.
Python Data Science Handbook: Essential Tools for Working with Data - PDF, 1st Edition For many researchers, Python is a first-class tool, primarily because of its libraries for storing, manipulati...
If you’ve picked up this book, you’re probably aware of the extraordinary progress that deep learning has represented for the field of artificial intelligence in the recent past. In a mere five ye...
Learning Correct Cryptography by Example. The interconnected world of the current era has drastically changed everything, including banking, entertainment, and even statecraft. Despite difference...
For courses in business intelligence or decision support systems. A managerial approach to understanding business intelligence systems. To help future managers use and understand analytics, Business...