10/19 9(For your hobbies) Prompt the user for raw_input()


#1

This is my code, which is running very well but why am I getting this error : Prompt the user for raw_input():

hobbies = []

for s in range (3):
  hobby = raw_input ("What are your hobbies?")
  hobbies.append(str(hobby))
  
print hobbies

#2

you can’t have a space between raw_input and (


#3

But it’s running and asking for input for 3 times and printing out the list as well


#4

Because of the people who build python are very clever.

Python might be able to handle the space, the codecademy exercise validition regex can’t. Its also really uncommon to include a space where you placed it.


#5

Thank you!!
That’s a precious advice-will keep in mind forever :wink:


#6

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