What is used to create Unicode string in Python?



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

Post New Answer

More Python Interview Questions

Which module is used to control the gpio in python?

0 Answers  


What is the difference between locals() and globals ()?

0 Answers  


What are special methods in python and how to implement?

0 Answers  


What are the different file-processing modes with python?

0 Answers  


What's a python script?

0 Answers  






Is python open source? If so, why it is called so?

0 Answers  


Is python better than matlab?

0 Answers  


Should I learn r or python first?

0 Answers  


What does the enum function in python do?

0 Answers  


Why pandas is used in python?

0 Answers  


How many modes are there in python?

0 Answers  


How do I quit python?

0 Answers  


Categories