[Tutor] please help

Cameron Simpson cs at zip.com.au
Sat Mar 22 03:50:27 CET 2014


On 22Mar2014 00:04, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
> On 21/03/2014 21:39, Cameron Simpson wrote:
> >On 21Mar2014 20:31, Mustafa Musameh <jmmy71 at 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 <cs at 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 <glena at armory.com> http://www.armory.com/~glena/


More information about the Tutor mailing list