Fun python 3.2 one-liner

Xavier Ho contact at xavierho.com
Tue Mar 29 06:14:36 EDT 2011


http://www.ideone.com/infch
^ Result of the below code

On 29 March 2011 19:50, Raymond Hettinger <python at rcn.com> wrote:

> from collections import Counter
> from itertools import product
>
> print('\n'.join('*'*(c//2000) for _,c in sorted(Counter(map(sum,
> product(range(6), repeat=8))).items())))
>
>
> almost-normally-yours,
>
> Raymond
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110329/4c2aecfd/attachment-0001.html>


More information about the Python-list mailing list