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.
python - Sample - python code :
python tutorial - Output :
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.
python - Sample - python code :
python tutorial - Output :
5. sort() :- This function sorts the list in increasing order.
6. reverse() :- This function reverses the elements of list.
python - Sample - python code :
python tutorial - Output :
7. extend(b) :- This function is used to extend the list with the elements present in another list. This function takes another list as its argument.
8. clear() :- This function is used to erase all the elements of list. After this operation, list becomes empty.
Wikitechy tutorial site provides you all the learn python , free online courses python , best online python course , online learning
python , python learn to code , free online course python programming , learn to program python , introduction to python course ,
python course , python free online course , learn python 3 online
Related Searches to List Methods in Python | del, remove(), sort(), insert(), pop(), extend()…
enumerate pythonpython list appendpython dictionarydictionary pythondelete list pythonpython delete list itemdelete pythonpython 3 deldelete an item from a list pythonpython list remove itempython remove first element from listpython remove object from listpython remove item from listremove index from list pythonremove item list pythonpython remove item in listremove in list pythonpython list removepop list pythonpython string poppop python 3python list extendpython extend listpopremovesortinsertextendpython list pop firstpython list methodspython list insertpython dictionary methodspython add to dictionarypython 3 dictionarypython create empty list