List Methods for Manipulating Data in Python


Use list methods to modify and query lists.

Source Code

my_list.append(6)  # Add an item
print(my_list.pop())  # Remove and return the last item
print(my_list.index(3))  # Find the index of an item
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments