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

What does super () do python?

0 Answers  


Do while loops python?

0 Answers  


What is python method?

0 Answers  


What are python modules? Name some commonly used built-in modules in python?

0 Answers  


What type of language is python? Programming or scripting?

0 Answers  






please give the code for these 1 2 4 7 11 16...

1 Answers  


What are python slots?

0 Answers  


Which is the default function in a class?

0 Answers  


Name the function which helps to change the files permission

0 Answers  


What are the two main types of functions in python?

0 Answers  


How to generate random numbers in python?

0 Answers  


Why do u want this job?

0 Answers  


Categories