More with for


#1

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

# Your code here!
for number in start_list:
    square_list[0]=start_list.append(number**2)
    square_list.sort()

print square_list

#2

The is some trouble in the kitchen with that line. Give us a jingle if you wish to talk about it.


#3

Hi Roy. Is there a chance you could help? I am stuck with this too.. Thanks.


#4

That is the line that should be inside the loop. After the loop is finished, then perform the sort.


#7

2 posts were split to a new topic: ERROR. The program took too long to finish


#8

r u sure about that? aren't we meant to append to square list

square_list.append(number**2)

#10

Yes I'm having problem with this same line.
square_list[0]=start_list.append(number**2)
Open to suggestions


#11

A combination of the above two replies should solve your problem.


#12

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