Question about appending


The error message is "Make sure to sort square_list after filling it!"

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

# Your code here!
for item in start_list:
    square_list.append(item **2)
print square_list


You need to sort square_list before you print it. You can do this by using the .sort() method.


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