20.2k views
17 votes
What is the next line?

>>> tuple B = (5, 7, 5, 10, 2. 7)

>>> tupleB.count(7)

1

0

2

5

User Want Query
by
7.5k points

1 Answer

10 votes

Answer:

Answered below

Step-by-step explanation:

The next line is 1.

The python count function returns the number of times an element appears in a tuple or a list.

In the tupleB tuple, 7 is passed into the count function. The number of times 7 appears in tupleB is just once alongside 5, 2.7, 10 and 5. Therefore, the count function returns 1 in the next line.

User Flexoid
by
8.1k points