Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def makeLst(nr, rev):
- lst = []
- while nr != 0:
- digit = nr % 10
- if digit < 7 and digit % 2 == 1:
- lst.append(nr % 10)
- nr //= 10
- if rev:
- lst.reverse()
- return lst
- print(makeLst(int(input("nr: ")), True))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement