On 22Mar2014 00:04, Mark Lawrence <[email protected]> wrote: > On 21/03/2014 21:39, Cameron Simpson wrote: > >On 21Mar2014 20:31, Mustafa Musameh <[email protected]> wrote: > > > >I would collect the statistics using a dictionary to keep count of > >the characters. See the dict.setdefault method; it should be helpful. > > > > Delightfully old fashioned but I'd now prefer > http://docs.python.org/3/library/collections.html#collections.Counter > :)
Maybe, but using a dictionary is easy and Mustafa will learn more. Cheers, -- Cameron Simpson <[email protected]> Do not underestimate your abilities. That is your boss's job. It is your job to find ways around your boss's roadblocks. - Glen Appleby <[email protected]> http://www.armory.com/~glena/ _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
