# Sum up a number in words [duplicate]

Here's a simple one.

In the shortest code possible, given an arbitrary number such as 567421, print it out in words:

five
six
seven
four
two
one


You may assume the input is an integer that is already provided in a one-letter variable such as n.

## marked as duplicate by ProgramFOX, undergroundmonorail, Martin Ender, user80551, VenteroJun 27 '14 at 13:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• I see, sorry about that, didn't find those when i was searching. – ToonAlfrink Jun 27 '14 at 12:52
• Though both possible duplicates ask something slightly different. – ToonAlfrink Jun 27 '14 at 12:52
• In particular the only change you need to make to answers of the duplicate mentioned by undergroundmonorail is to call the code you already have for each digit of the input. – Martin Ender Jun 27 '14 at 12:56

## 1 Answer

Python

for i in n:print' ottffssennwhoiieiieoruvxvgn  ere ehe  e   nt'[int(i)::9]


"Inspired" by https://codegolf.stackexchange.com/a/32156/18638