[]
.0
).list[start:stop:step]
append()
to add an element to the end of the list.insert()
to add an element at a specific position.extend()
to add multiple elements from another list.remove()
to remove the first occurrence of a value.pop()
to remove an element at a specific index (or the last element if no index is provided).del
to delete an element or a slice of elements.clear()
to remove all elements from the list.index()
to find the index of the first occurrence of a value.in
to check if an element exists in the list.sort()
to sort the list in place (modifies the original list).sorted()
to return a new sorted list (does not modify the original list).reverse()
to reverse the list in place.len()
to find the number of elements in a list.[expression for item in iterable if condition]
append()
instead of +
for adding elements to a list (more efficient).