Advertisement
STANAANDREY

lsd4 2.1b

Oct 21st, 2022
745
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. def makeLst(nr, fn):
  2.     lst = []
  3.     while nr != 0:
  4.         digit = nr % 10
  5.         if fn(digit):
  6.             lst.append(nr % 10)
  7.         nr //= 10
  8.  
  9.     return lst
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement