DEV Community

loading...
Cover image for APPEND (PYTHON3)

APPEND (PYTHON3)

francnstein profile image francnstein ・1 min read

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 𝗐𝗂𝗍𝗁 ❤

Discussion (0)

pic
Editor guide