List Methods

 0    12 kartičky    sir
stáhnout mp3 Vytisknout hrát zkontrolovat se
 
otázka odpověď
Adds an item to the end of the list.
začněte se učit
. append()
Adds an item at the specified index.
začněte se učit
. insert()
Removes the specified item.
začněte se učit
. remove()
Removes the specified index, (or the last item if index is not specified).
začněte se učit
. pop(i'index)
Keyword which, removes the specified index, whole list, variable or function.
začněte se učit
del
Method which empties the list.
začněte se učit
. clear()
You can make a copy of a list with the this method.
začněte se učit
list2 = list1. copy()
Usethis method to add list2 at the end of list1.
začněte se učit
list1. extend(list2)
Returns the index of the first element with the specified value
začněte se učit
. index(value)
Reverses the order of the list.
začněte se učit
. reverse()
Sorts the list.
začněte se učit
list. sort(reverse=True|False, key=myFunc)
Returns the number of times a specified value occurs in a list.
začněte se učit
. count()

Chcete-li přidat komentář, musíte se přihlásit.