Loading

Paste #pp4mfiqxw

  1. print("Enter the range, values separated by comma:")
  2. [a,b] = [int(z) for z in input().split(',')]
  3. odd = set('13579')
  4. l = []
  5. for n in range(a, b + 1):
  6.     # If there are only even digits, the set is disjoint with odd:
  7.     if odd.isdisjoint(set(str(n))):
  8.         l.append(n)
  9. print(*l, sep=',')

Version history

Revision # Author Created at
pxhdxo9yw Anonymous 16 Oct 2018, 13:37:17 UTC Diff

Comments