Closed 1hachem closed 4 months ago
append(element): Adds an element to the end of the list.
extend(iterable): Extends the list by appending elements from the iterable.
insert(index, element): Inserts an element at the specified position.
remove(element): Removes the first occurrence of the element.
pop([index]): Removes and returns the element at the given index (last item if index is not specified).
slice
index(element[, start[, end]]): Returns the index of the first occurrence of the element.
count(element): Returns the number of occurrences of the element in the list.
sort([key=None, reverse=False]): Sorts the items of the list in place.
reverse(): Reverses the elements of the list in place.
len(list): Returns the number of items in the list.
sum(list): Returns the sum of all elements in the list (elements must be numbers).
max(list): Returns the largest item in the list.
min(list): Returns the smallest item in the list.
any(list. value): Returns True if any element of the list is equal a certain value. If the list is empty, returns False.
you can find other useful ones too
@ayoubmrx start working on these, use list[Any]
list[Any]
append(element): Adds an element to the end of the list.
extend(iterable): Extends the list by appending elements from the iterable.
insert(index, element): Inserts an element at the specified position.
remove(element): Removes the first occurrence of the element.
pop([index]): Removes and returns the element at the given index (last item if index is not specified).
slice
index(element[, start[, end]]): Returns the index of the first occurrence of the element.
count(element): Returns the number of occurrences of the element in the list.
sort([key=None, reverse=False]): Sorts the items of the list in place.
reverse(): Reverses the elements of the list in place.
len(list): Returns the number of items in the list.
sum(list): Returns the sum of all elements in the list (elements must be numbers).
max(list): Returns the largest item in the list.
min(list): Returns the smallest item in the list.
any(list. value): Returns True if any element of the list is equal a certain value. If the list is empty, returns False.
you can find other useful ones too