For your hobbies


Oops, try again. Prompt the user for input using raw_input() .

not sure, I do have the raw_input() function so I am not sure why I am getting an error

hobbies = []

for hobby in range(3):
    hobby = str(raw_input ("List a Hobby: "))
print hobbies


you have a space between raw_input and (, which give the exercise trouble to validate your code


The output from raw_input is string type data so we do not need to cast it to string.


actually, on codecademy its store the result as unicode, which if you print the lists shows u in front of the "strings"


Face palm... Belay, belay. Just checked the lesson and see where this problem came up.


is what I have for that lesson. Do you recall where this is introduced?


what was introduced? .encode()? nowhere on codecademy, i only know codecademy stores the input as unicode, appylpye looked into it, but i forgot the outcome


What about Unicode? Is it covered before this lesson or was it an oversight of the author?


i think that appylpye and i concluded that codecademy thing (in any python lesson) the result is stored as unicode. i just opened the first exercise (link), ran this code:

a = []
b = raw_input("test: ")
print a

also unicode, it seems to be a codecademy thing. You will have to ask appylpye


thanks, I didn't realize that space would cause a problem


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