• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
October 30, 2022 |630 Views

List Methods - Part 2

  Share   Like
Description
Discussion

1. del[a : b] :- This method deletes all the elements in range starting from index ‘a’ till ‘b’ mentioned in arguments. 2. pop() :- This method deletes the element at the position mentioned in its arguments. 3. insert(a, x) :- This function inserts an element at the position mentioned in its arguments. It takes 2 arguments, position and element to be added at respective position. 4. remove() :- This function is used to delete the first occurrence of number mentioned in its arguments. List Methods - Part 2 : https://www.geeksforgeeks.org/list-methods-in-python-set-2-del-remove-sort-insert-pop-extend/