fork download
  1. def f(number):
  2. s = 1
  3. for x in str(number):
  4. if x != '0':
  5. s *= int(x)
  6. return s
  7.  
  8.  
  9. print(f(123))
  10. print(f(100101))
Success #stdin #stdout 0.02s 8688KB
stdin
Standard input is empty
stdout
6
1