List Methods

 0    12 adatlap    sir
letöltés mp3 Nyomtatás játszik ellenőrizze magát
 
kérdés válasz
Adds an item to the end of the list.
kezdjen tanulni
. append()
Adds an item at the specified index.
kezdjen tanulni
. insert()
Removes the specified item.
kezdjen tanulni
. remove()
Removes the specified index, (or the last item if index is not specified).
kezdjen tanulni
. pop(i'index)
Keyword which, removes the specified index, whole list, variable or function.
kezdjen tanulni
del
Method which empties the list.
kezdjen tanulni
. clear()
You can make a copy of a list with the this method.
kezdjen tanulni
list2 = list1. copy()
Usethis method to add list2 at the end of list1.
kezdjen tanulni
list1. extend(list2)
Returns the index of the first element with the specified value
kezdjen tanulni
. index(value)
Reverses the order of the list.
kezdjen tanulni
. reverse()
Sorts the list.
kezdjen tanulni
list. sort(reverse=True|False, key=myFunc)
Returns the number of times a specified value occurs in a list.
kezdjen tanulni
. count()

Kommentár közzétételéhez be kell jelentkeznie.