Hi everyone, welcome back. Lists are a data structure in the Python language that are capable of storing several items in to a singular list variable. Lists are a built in data type in Python and we will go over functions regarding lists. For a more in depth tutorial on lists in Python, click here.
Press enter or click to view image in full size
List Functions
append(): adds an item at the end of the list
clear(): removes every item from the list
copy(): retrieves a copy of the list
count(): retrieves the number of items with the given value
extend(): adds the items of another list or other iterable into the end of the list
index(): retrieve the index number of the first item with the given value
insert(): adds an item at a given index position in the list
pop(): removes an item at the given index position from the list
remove(): removes the first item of the given value from the list
reverse(): reverses the order of the items in the list
sort(): sorts the list by the given sorting technique
Hi, I'm a passionate technology enthusiast and lifelong learner. Beyond my technical pursuits, I'm also passionate about sharing my enthusiasm with others.