List Methods

 0    12 Fiche    sir
скачать mp3 басу ойын өзіңді тексер
 
сұрақ жауап
Adds an item to the end of the list.
оқуды бастаңыз
. append()
Adds an item at the specified index.
оқуды бастаңыз
. insert()
Removes the specified item.
оқуды бастаңыз
. remove()
Removes the specified index, (or the last item if index is not specified).
оқуды бастаңыз
. pop(i'index)
Keyword which, removes the specified index, whole list, variable or function.
оқуды бастаңыз
del
Method which empties the list.
оқуды бастаңыз
. clear()
You can make a copy of a list with the this method.
оқуды бастаңыз
list2 = list1. copy()
Usethis method to add list2 at the end of list1.
оқуды бастаңыз
list1. extend(list2)
Returns the index of the first element with the specified value
оқуды бастаңыз
. index(value)
Reverses the order of the list.
оқуды бастаңыз
. reverse()
Sorts the list.
оқуды бастаңыз
list. sort(reverse=True|False, key=myFunc)
Returns the number of times a specified value occurs in a list.
оқуды бастаңыз
. count()

Пікір қалдыру үшін жүйеге кіру керек.