The append() method in python adds a single item to the existing list. It doesn't return a new list of items but will modify the original list by adding the item to the end of the list. After executing the method append on the list the size of the list increases by one.
num = [100,200,300,400]
num.append(900)
print(num)
Example from Sololearn
FRANCNSTEIN ยฉ 2020 | Created ๐๐๐๐ โค
Top comments (0)