Can you explain what's going on here


#1



"""
Could you please explain what's going on below?
What's the purpose of .append() in my function?
Any explanation would greatly be appreciated!
"""

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

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

print square_list


#2

.append() has been used before? its a method you can use to append/add to the end of the list


#3

I've used it before, but I don't get how it wil work in this case.
can you explain further?

so in my code, what am I appending? or adding? :weary:


#4

we append the squared numbers of start_list to square_list. To achieve this, we use a loop


#5

omg. i get it now

i feel dumb for this :joy:
THANKS!


#6