Why am I getting a syntax error?


hobbies = []

for i in range(3):
hobby = int(raw_input("What is your hobbie")

Keep on getting a syntax error in line 5???

help please


First how to format code so we can see the indentaion.
1) copy and paste your code
2) highligt/select your whole code
3) then look for this </> and press it.
simply press ctrl + shift + c and past the code inside the highlighted area.
Now then first you are mising ")" in hobby variable at the end.
now go to the line 3 at the beginning and press tab that should fix the problem.


maybe because you're creating hobby 3 times, try it like this

hobbies = []

# Add your code below!
for i in range(3):
    hobbies.append(str(raw_input("What's your Hobbie?")))

print hobbies


thanks for the help, realized that I was converting the string input into an integer input, once that was fixed, all worked just fine.