On 22Mar2014 00:04, Mark Lawrence <breamore...@yahoo.co.uk> wrote: > On 21/03/2014 21:39, Cameron Simpson wrote: > >On 21Mar2014 20:31, Mustafa Musameh <jmm...@yahoo.com> 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 <c...@zip.com.au> 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 <gl...@armory.com> http://www.armory.com/~glena/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor