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 |
What is loop and types?
What is the best python interpreter?
How will you do debugging in python?
What is difference between pass and continue in python?
What is repl in python?
Explain docstring in python?
Why do we need tuples?
What are the rules for local and global variables in Python?
How can you identify the data type of any variable in python?
Is python open source? If so, why it is called so?
What are basic overloading methods in python?
What is slice notation in python to access elements in an iterator?