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


Picture showing the output of append function in python



Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, April 10, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250