Hello everyone, i’m new at coding with python and i do not understand what the .append() part does?
This exercise is from the learn python “More with For” at code academy.
Write a for-loop that iterates over start_list and .append()s each number squared (x ** 2) to square_list.
Then sort square_list!
start_list = [5, 3, 1, 2, 4]
square_list = 
for number in start_list:
square_list.append(number ** 2)
I just want to understand what is .append() used for in this code. Thanks in advance!!!