9. More with 'for'


I don`t know which part I wrong.
Please help me

Replace this line with your code.


The instruction say ;
Write a for-loop that iterates over start_list and .append()s each number squared (x ** 2) to square_list.
Then sort square_list!

so you didn't square each number
you can use this function .sorted() to sort a list


The error is due to assigning the result of append to square_list in line 6. Remove the assignment and it will work.


Okay! I got it!!!
Thanks a lot :slight_smile:


I got it ! thank you so much! :slight_smile:


You wrote square as sqare :slight_smile:


The following code works:-
start_list = [5, 3, 1, 2, 4]
square_list = []

Your code here!

for s in start_list:

print square_list