List Methods in Python

visibility 1 مشاهدة schedule منذ 5 سنة timer 14:23
open_in_new Dailymotion
In this video we see all methods (functions) of list in python)<br /><br />Python does not have built-in support for Arrays, but Python Lists can be used instead.<br /><br />In Python programming, a list is created by placing all the items (elements) inside square brackets [ ], separated by commas.<br /><br />List method and their description<br /><br />Method Description<br />append() Adds an element at the end of the list<br />clear() Removes all the elements from the list<br />copy() Returns a copy of the list<br />count() Returns the number of elements with the specified value<br />extend() Add the elements of a list (or any iterable), to the end of the current list<br />index() Returns the index of the first element with the specified value<br />insert() Adds an element at the specified position<br />pop() Removes the element at the specified position<br />remove() Removes the first item with the specified value<br />reverse() Reverses the order of the list<br />sort() Sorts the list<br /><br />____________________________________________________<br /><br />If you like the video then share it