For your hobbies


#1



https://www.codecademy.com/en/courses/python-beginner-en-cxMGf/1/2?curriculum_id=4f89dab3d788890003000096#


My code works fine but it's just that after "save & submit code", the hobbies list on the screen would show the following:

[u'watching movies', u'reading books', u'working out']
None


What are the 'u's? where do they come from and how do I get rid of them?


Replace this line with your code. 
hobbies = []

# Add your code below!
for i in range(3):
    hobby = raw_input("What is your hobby?")
    hobbies.append(hobby)
print hobbies


#2

codecademy stores the result as unicode, not as string. Take a guess what the u stands for xD

you can cast the user input to string to get rid of it


#3

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