Convert from numbers to letters

Bill Mill bill.mill at gmail.com
Thu May 19 15:00:24 EDT 2005


On 19 May 2005 11:52:30 -0700, rh0dium <sklass at pointcircle.com> wrote:
> Call me crazy..  But it doesn't work..
> 

What doesn't work? What did python output when you tried to do it? It
is python 2.4 specific, it requires some changes for 2.3, and more for
earlier versions of python.

> for i, digraph in enumerate(sorted([''.join((x, y)) for x in alpha for
> y in [''] + [z for z in alpha]], key=len)):
>    globals()[digraph]=i+1
> 
> How do you implement this sucker??

Works just fine for me. Let me know what error you're getting and I'll
help you figure it out.

Peace
Bill Mill
bill.mill at gmail.com



More information about the Python-list mailing list