10. For your hobbies



hobby: z
hobby: c
['q', 'l', u'z', u'', u'c']

Why is there a 'u' ?
why not ['q',...'z', '', 'c']

Replace this line with your code. 
hobbies = ['q', 'l']

# Add your code below!
for i in range(3):
    hobby = raw_input('hobby: ')
print hobbies


raw_input stores the data as unicode, so the u is of unicode, use str() to cast the unicode to a string


this is the code that I used and it worked correctly. it gives the same exact response but it's a little bit of a shortcut i guess? not sure if it would work in every instance.

hobbies = []

Add your code below!

for i in range(3):
hobbies.append(str(raw_input("Hobby: ")))
print hobbies


Your code should work fine always, it is just written a bit shorter, nicely done


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