List Methods

 0    12 fiszek    sir
ściągnij mp3 drukuj graj sprawdź się
 
Pytanie Odpowiedź
Adds an item to the end of the list.
rozpocznij naukę
. append()
Adds an item at the specified index.
rozpocznij naukę
. insert()
Removes the specified item.
rozpocznij naukę
. remove()
Removes the specified index, (or the last item if index is not specified).
rozpocznij naukę
. pop(i'index)
Keyword which, removes the specified index, whole list, variable or function.
rozpocznij naukę
del
Method which empties the list.
rozpocznij naukę
. clear()
You can make a copy of a list with the this method.
rozpocznij naukę
list2 = list1. copy()
Usethis method to add list2 at the end of list1.
rozpocznij naukę
list1. extend(list2)
Returns the index of the first element with the specified value
rozpocznij naukę
. index(value)
Reverses the order of the list.
rozpocznij naukę
. reverse()
Sorts the list.
rozpocznij naukę
list. sort(reverse=True|False, key=myFunc)
Returns the number of times a specified value occurs in a list.
rozpocznij naukę
. count()

Musisz się zalogować, by móc napisać komentarz.