More with 'for'


#1

Plz help me!
I wrote this as my code and it wont work

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

Your code here!

for start_list in square_list:
square_list.append(number ** 2)
square_list.sort()

print square_list

Someone plz help me


#2

Hi, @sofarsolucky ,

Please explain what this loop header is designed to do ...

for start_list in square_list:

It may help to review the example in the instructions that processes the animals list.


#3

This worked out for me but it is different than previous solutions...
start_list = [5, 3, 1, 2, 4]
square_list = []

Your code here!

for number in start_list:
square_list.append(number ** 2)
print square_list.sort

look for the space in front of the print


#4

I solved it. Thanks for your help


#5