list

  1. class list(object)
  2. list(iterable=(), /)
  3. Built-in mutable sequence.
  4. If no argument is given, the constructor creates a new empty list.
  5. The argument must be an iterable if specified.
  1. append(self, object, /)
  2. Append object to the end of the list.
  3. clear(self, /)
  4. Remove all items from list.
  5. copy(self, /)
  6. Return a shallow copy of the list.
  7. count(self, value, /)
  8. Return number of occurrences of value.
  9. extend(self, iterable, /)
  10. Extend list by appending elements from the iterable.
  11. index(self, value, start=0, stop=9223372036854775807, /)
  12. Return first index of value.
  13. Raises ValueError if the value is not present.
  14. insert(self, index, object, /)
  15. Insert object before index.
  16. pop(self, index=-1, /)
  17. Remove and return item at index (default last).
  18. Raises IndexError if list is empty or index is out of range.
  19. remove(self, value, /)
  20. Remove first occurrence of value.
  21. Raises ValueError if the value is not present.
  22. reverse(self, /)
  23. Reverse *IN PLACE*.
  24. sort(self, /, *, key=None, reverse=False)
  25. Stable sort *IN PLACE*.