lists and tuples Flashcards
this term refers to an individual item in a list
element
this is a number that identifies an item in a list
index
this is the first index in a list
0
this will happen when you try to use and index that is out of range for a list
an IndexError exception will occur
this function returns the length of a list
len
when the * operator’s left operand is a list and its right operand is an integer, the operator becomes…
the repetition operator
this list method adds an item to the end of an existing list
append
if you call the index method to locate an item in a list and the item is not found, this happens…
a ValueError exception is raised
this built in function returns the highest value in a list
max
this file object method returns a list containing the file’s contents
readlines
what is a list?
an object that contains multiple data items
what are the items stored in the list called?
elements