Why can I put "for number in start_list:" behind "square_list.append


#1

Why can I put "for number in start_list:" behind "square_list.append(number**2)"
Like this:

start_list = [5, 3, 1, 2, 4]
for number in start_list:
square_list = []
 square_list.append(number ** 2)
# Your code here!

square_list.sort()
print square_list

More with 'for' unit 5, lesson 1, #9
#2

This array needs to be defined before the for statement. Each iteration it is being wiped out so that only the last result is in the final list.