Methods or operations performed on list?

All QuestionsCategory: PythonMethods or operations performed on list?
Chetan Shidling Staff asked 4 years ago

I need short information.

1 Answers
Chetan Shidling Staff answered 4 years ago

Methods or operations performed on list:

  1. #append() – adds an element at the end of the list
  2. #insert() – adds an element at the specified position
  3. #extend() – adds the elements of a list ( or any iterable), to the end of the current list
  4. #copy() – returns a copy of the list
  5. #count() – retuns the number of elements with the specified value
  6. #clear() – removes all the elements from the list
  7. #index() – returns the index of the first element with the specified value
  8. #remove() – removes the item with the specified value
  9. #pop() – removes the order of the list
  10. #reverse() – reverses the order of the list
  11. #sort() – sorts the list