Python List Append Vs Extend Vs Insert || Pop Vs Remove Vs Del Methods

Опубликовано: 29 Сентябрь 2024
на канале: Placement Raja
1,064
16

Python list Append vs Extend and Pop vs Remove methods are clearly explained with lot of examples in this video.

Python list Append :
Append method is used to add objects to the end of the list

Python List Extend:
Extend method accepts iterable object as argument and add each and every element from that iterable object separately to the end of the list

Append Vs Insert :
Append method adds Objects to end of the list whereas Insert method adds object at any specific position that we ask for.

Python list Pop vs Remove Vs Del methods:

Pop method returns the element at specific index before deleting that element at that index

Remove method deletes the element which we give as argument to that method if it is there ,otherwise rises an error

Del method simply deletes element at specific index.


Visit http://placementraja.com for full Python Tutorial

Follow us :   / placementraja  
Subscribe :    / @placementraja4232