Python code to express a large integer in words?

John Machin machin_john_888 at hotmail.com
Tue Jul 31 19:02:26 EDT 2001


claird at starbase.neosoft.com (Cameron Laird) wrote in message news:<CC8E8B653E34FE14.404EDCBD7E04E166.6B4ABEFBB3D42057 at lp.airnews.net>...
> In article <3B66EDD0.62196C8D at mjs400.co.uk>, ptah  <ptah at mjs400.co.uk> wrote:
> >For interest I have included code below from the as400network Club Tech
> >iSeries Programming Tips - 06.21.01 it is written in IBM RPG IV and is a
>  RPG--fascinating.
> >kind of DLL (we call them service programs) that does the above, I would
> >like to see how much more succinct a Python equivalent could be, purely
> >because I would like to jump ship and code in something more expressive
> >and need to put the case for Python to people who are not in the habit
> >of thinking in an abstract way ;)
> 			.
> 			.
> 			.
> <URL: http://mini.net/tcl/591.html > does the same for
> Tcl, and several European languages (if you ask nicely,
> Richard's likely to do it for Tagalog or Tibetan, too).
> For Python, see <URL:
> http://groups.google.com/groups?th=477859294d5872dd >.

:-)
This does a fine job for 'Merican (143 -> "one hundred forty three")
but as the OP's e-mail address ended in .uk he's going to have to work
on it a little to get the local idiom ("one hundred and forty three").
:-)



More information about the Python-list mailing list