- print("Enter the range, values separated by comma:")
- [a,b] = [int(z) for z in input().split(',')]
- odd = set(['1','3','5','7','9'])
- l = []
- for n in range(a,b+1):
- # create a set of characters from the number
- s = set(str(n))
- # If there are only even digits, the intersection with the odd ones is empty:
- if odd & s == set([]):
- l.append(n)
- print(*l, sep=',')