fork(1) download
  1. digits = { 0:"Zero", 1:"One", 2:"Two", 3:"Three", 4:"Four", 5:"Five", 6:"Six", 7:"Seven", 8:"Eight", 9:"Nine" }
  2.  
  3. applyf = lambda f, *n: f(f, *n)
  4. list = [applyf(lambda f, n: f(f, n / 10) + digits[n % 10] if n > 0 else "", n) for n in [16, 58, 510]]
  5.  
  6. for s in list:
  7. print(s)
  8.  
Success #stdin #stdout 0.01s 7896KB
stdin
Standard input is empty
stdout
OneSix
FiveEight
FiveOneZero