Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Python Tutorials: List of functions of list Datatypes


'append',
'clear',
'copy',
'count',
'extend',
'index',
'insert',
'pop',
'remove',
'reverse',
'sort'

  • sort(): Sorts the list in ascending order.
  • type(list): It returns the class type of an object.
  • append(): Adds one element to a list.
  • extend(): Adds multiple elements to a list.
  • index(): Returns the first appearance of a particular value.
  • max(list): It returns an item from the list with a max value.
  • min(list): It returns an item from the list with a min value.
  • len(list): It gives the overall length of the list.
  • clear(): Removes all the elements from the list.
  • insert(): Adds a component at the required position.
  • count(): Returns the number of elements with the required value.
  • pop(): Removes the element at the required position.
  • remove(): Removes the primary item with the desired value.
  • reverse(): Reverses the order of the list.
  • copy():  Returns a duplicate of the list.

Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x