List Methods

 0    12 карточки    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()

Вы должны войти в свой аккаунт чтобы написать комментарий.