10. Hobbies list printing funny


#1

My code passes, but when I print there is an unexpected 'u' before every list item. Screenshot and code below. Can anyone advise where I'm going wrong?


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


Replace this line with your code. 
hobbies = []

for hobby in range(3):
    
    hobby = raw_input("Hobby: ")
    hobbies.append(hobby)
    
print hobbies


#2

That u is not a fault in your code but actually a codecademy bug! :slight_smile:

Hope this was the answer you were looking for. :grin:


#3

That happened to me too. I just added str in front of raw_input as such:
str(raw_input("Your hobbies: "))

Problem solved! But I see CA says it is a bug, which also crossed my mind since it was so weird.


#4

Thanx a lot for sharing


#5

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