Chad Crabtree wrote:
Ok you got me thinking. I used the same thing I posted before but
created a one liner that as a side affect makes adict like before.
[adict.__setitem__(x,adict.get(x,0)+1) for x in l]
I think it's kinda funny and ugly, ohh and not particuarly clear
about what it does.
Uhh, list-comprehensions with side effects. Must..... resist.....
And now write the Zen of Python 10 times ;-)
Greetings,
Wolfram
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor