'unicode' object has no attribute 'append'


#1


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

AttributeError: 'unicode' object has no attribute 'append'

prompt the user for a hobby 3 times, then append each one to hobbies.


hobbies = []

for i in range(3):
     hobbies=raw_input("What is your hobby?")
     hobbies.append(hobby)


#2

the variable where you store the user input and the list have the same name


#3

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