Console output issue


#1

I wrote this code:

hobbies = []

Add your code below!

for i in range(3):
hobby = raw_input("Name a hobby: ")
hobbies.append(hobby)

print hobbies

OUTPUT:

Name a hobby: coding
Name a hobby: texting
Name a hobby: music
[u’coding’, u’texting’, u’music’]

Where did the “u” come from in the output?


#2

its the u of unicode:

https://docs.python.org/2/howto/unicode.html


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.