23 Program to find the repeated items of a tuple using Python

Program:
t = [int(x) for x in input("Enter any value:").split()]
t = tuple(t)
print("Repeated Values:")
for i in range(0,len(t)):

    for j in range(i+1,len(t)):

        if t[i]==t[j]:

            print(t[i],end=" ")

Output:

Program to find the repeated items of a tuple using Python



Previous
Next Post »