# 9 more with for

#1

Good morning everyone.
I don't know how to append correctly.

``````start_list = [5, 3, 1, 2, 4]
square_list = []
square_list.append(start_list[0:5])
print square_list``````

When I submit code I get this [[5, 3, 1, 2, 4]] instead of this [5,3,1,2,4]

#2

it says write a for loop, so you need for loop. Do you understand what for loops does?

#3

First, thanks for the quick reply.

Yes, I do. I already past the exercise.
but I can't understand why it gives me the double [[ instead of just one [.
I would like to fix it in order to use in future applications.

Good day !

#4

because you are appending whole list, everything, for loop iterates over what's in list and append

that's my guess

#5

you have to use for loop!!

so this is how i did it!

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

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

study the code and think about it!! before runing try to understand what it those !

#6

Help please! Keeps telling me program took too long! what is wrong? thanks!
start_list = [5, 3, 1, 2, 4]
square_list = []

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

print square_list

#7

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

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

print square_list

#8

well,you may want to check the hint.

here is what I have passed.
start_list = [5, 3, 1, 2, 4]
square_list = []