QUESTION IMAGE
Question
what is the next line?
>> tupleb = (5, 7, 5, 10, 2, 7)
>> tupleb.count(7)
1
5
0
2
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.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
D. 2