What is used to create Unicode string in Python?
Answer / chaitanya
Unicode is a system to represent characters from all the world's different languages.
Two methods can be used to create unicode string:
unicode() method is unicode(string[, encoding, errors]), its arguments should be 8-bit strings. The first argument is converted to Unicode using the specified encoding, if encoding argument left, the ASCII encoding is used for the conversion.
encode() method is encode([encoding], [errors='strict']), which returns an 8-bit string version of the Unicode string.
| Is This Answer Correct ? | 0 Yes | 0 No |
How does break work in python?
How to get all keys from dictionary ?
What is python web application framework?
What is the statement that can be used in python if the program requires no action but requires it syntactically?
Why is not__getattr__invoked when attr==’__str__’?
Can I use notepad ++ for python?
Which database is best with python?
Is sorted in python?
Will class members accessible by instances of class?
What is pytest in python?
How to use decorators in Python?
How would you generate a random number in python?