IDNLearn.com makes it easy to find the right answers to your questions. Discover in-depth and trustworthy answers to all your questions from our experienced community members.

choose the function that will result in a 3 on the next line.
>>> aList = [3, 10, 10, 10, 30, 30]
>>> aList. ___(10)
count
index
pop


Sagot :

Answer: count

Explanation:

Given the program :

>>> aList = [3, 10, 10, 10, 30, 30]

>>> aList. ___(10)

To obtain a value of 3 on the next line, we use the count function :

aList.count(10)

The above statement returns the number of occurrences of digit 10 in the list aList. Digit 10 occurs 3 times in the list. Hence, output will be 3

The index function returns the lowest index where the digit 10 appears and thus it will give an output of 1

The pop function to used to deletes item belonging to a specified index and returns the item which is removed, for this exercise, selecting the pop function will throw an error as the list does not have any item with the index 10.

Answer:

count

Explanation:

count does exactly what it is inteded for...count, counts.

count(10) counts how many 10s there are. theres 3 tens so count is the answer to get 3 on the next line.