Question #166

What is the type of the object below?

The type of str(("Python".encode())) is a string. Even though "Python" is first encoded to a bytes object, the str() function then casts it to a string. Interestingly enough, the representation of str(("Python".encode())) will contain the bytes literal suffix e.g. b'Python' . (

Comment on Disqus:

Comment on Twitter:

Question difficulty: πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅