what is the next line?\n>>> tupleb = (5, 7, 5, 10, 2, 7)\n>>> tupleb.count(7)\n1\n5\n0\n2

what is the next line?\n>>> tupleb = (5, 7, 5, 10, 2, 7)\n>>> tupleb.count(7)\n1\n5\n0\n2

what is the next line?\n>>> tupleb = (5, 7, 5, 10, 2, 7)\n>>> tupleb.count(7)\n1\n5\n0\n2

Answer

Explanation:

Step1: Understand count method

The count method in Python for tuples counts the number of occurrences of a specified element.

Step2: Count occurrences of 7

In the tuple tupleB=(5, 7, 5, 10, 2, 7), the number 7 appears 2 times.

Answer:

D. 2