belongs to collection: Python Tuple Exercises
Given:
tuple1 = (50, 10, 60, 70, 50)
Expected output:
2
Hint:
Use the count() method of a tuple.
count()
Solution:
tuple1 = (50, 10, 60, 70, 50) print(tuple1.count(50))
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Hint:
Use the
count()
method of a tuple.Solution:
need an explanation for this answer? contact us directly to get an explanation for this answer