For your hobbies


The code is working and passes the lesson OK. I have added a print statement to check the appended hobbies list and it prints with a "u" before each item in the list. Does anyone know why this is?

hobbies = []

# Add your code below!
for i in range(3):
    hobby = raw_input("Name of hobby?")

print hobbies


yea, codecademy stores the input as unicode rather then a string.

simply cast to a string to get rid of the problem:



Lovely, thanks for the quick response :0)


normally raw_input() gives you strings, for codecademy this isn't the case (as you experienced), if i ever figure out why, i will let you know, but normally you would get strings


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