On Fri, 09 Jan 2009 04:04:41 +0100, Johannes Bauer wrote:

>       datamap = { }
>       for i in range(len(data)):
>               datamap[ord(data[i])] = datamap.get(data[i], 0) + 1

Here is an error by the way:  You call `ord()` just on the left side of 
the ``=``, so all keys in the dictionary are mapped to ones after the 
loop which gives a pretty boring PGM.  :-)

Ciao,
        Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to