Loading

numbers with only even di

  1. print("Enter the range, values separated by comma:")
  2. [a,b] = [int(z) for z in input().split(',')]
  3. odd = set(['1','3','5','7','9'])
  4. l = []
  5. for n in range(a,b+1):
  6.     s = set(str(n))
  7.     if odd & s == set([]):
  8.         l.append(n)
  9. print(*l, sep=',')

Comments