Articles → PYTHON → Append Function In Python
Append Function In Python
Purpose
Example
my_list = [1,2,3,4,5]
# Print the list
print("Before calling append function", my_list)
# Calling the pop function will remove the top element from list
my_list.append(6)
# Print the list
print("After calling append function", my_list)
Output