I'm trying to make a function where it checks to see if a number gets repeated 2 times and 3 times and when it does it will return either 0 (no repeats detected) or 1 (both arguments entered have repeats). But for someone reason, 1 always prints even when there are no repeats. Is there an easier way to do this or a way to fix my code? Also ignore the print('t'), print("w"), and print("x"). Those were just a way to check what was going on.
def triple_double(num1, num2):
num1 = str(num1)
num2 = str(num2)
if ('111') or ('222') or ('333') or ('444') or ('555') or ('666') or ('777') or ('888') or ('999') in num1:
if ('11') or ('22') or ('33') or ('44') or ('55') or ('66') or ('77') or ('88') or ('99') in num2:
print('t')
print(1)
else:
print("w")
print(0)
else:
print("x")
print(0)
triple_double(0, 0)