List Methods

 0    12 speciālā zīme    sir
lejupielādēt mp3 Drukāt spēlēt pārbaudiet sevi
 
jautājums atbilde
Adds an item to the end of the list.
sākt mācīties
. append()
Adds an item at the specified index.
sākt mācīties
. insert()
Removes the specified item.
sākt mācīties
. remove()
Removes the specified index, (or the last item if index is not specified).
sākt mācīties
. pop(i'index)
Keyword which, removes the specified index, whole list, variable or function.
sākt mācīties
del
Method which empties the list.
sākt mācīties
. clear()
You can make a copy of a list with the this method.
sākt mācīties
list2 = list1. copy()
Usethis method to add list2 at the end of list1.
sākt mācīties
list1. extend(list2)
Returns the index of the first element with the specified value
sākt mācīties
. index(value)
Reverses the order of the list.
sākt mācīties
. reverse()
Sorts the list.
sākt mācīties
list. sort(reverse=True|False, key=myFunc)
Returns the number of times a specified value occurs in a list.
sākt mācīties
. count()

Lai ievietotu komentāru, jums jāpiesakās.