Program to find the repeated items of a tuple.

Code:

def Count(tup, en):

    return tup.count(en)

tup = (10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2)

print("Tuple:",tup)

num = int(input("Enter a number:"))

print(Count(tup, num), "times")

Output:

Comments

Popular posts from this blog

State use of pep and pip