Notes

Source: 📖 Problem Solving with Algorithms and Data Structures using Python 4.22

Date: 2021-10-30


Operations of an ordered list

  • add(item) adds a new item to the list, ensuring that the list's order is preserved.
  • remove(item) removes the given item from the list.
  • search(item) boolean function to check the existence of item in the list.
  • is_emtpy() boolean function to check if the list is empty.
  • size() returns the number of items in the list.
  • index(item) returns the index position of the item in the list.
  • pop() removes and returns the last item in the list.
  • pop(pos) removes and returns the item at the given index position.

See also: