Given Year, Find Next Distinct Year
def distinct(y):
year = str(y)
for i in year:
if year.count(i) > 1:
return False
return True
year = int(input("Enter a Year: "))+1
while True:
if(distinct(year)== True):
break
year += 1
print (year)
year = str(y)
for i in year:
if year.count(i) > 1:
return False
return True
year = int(input("Enter a Year: "))+1
while True:
if(distinct(year)== True):
break
year += 1
print (year)