Getting error, please help! FIGURED OUT DONT NEED HELP ANYMORE


Traceback (most recent call last):
File "python", line 6, in
AttributeError: 'int' object has no attribute 'append'

I don't know why the code isn't running.

start_list = [5, 3, 1, 2, 4]
square_list = []

# Your code here!
for list in start_list:
    list.append(list ** 2)

print square_list



You should be appending to square_list and not list

I hope this helps! :slight_smile:


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