[Tutor] Re: Tutor digest, Vol 1 #203 - 5 msgs

Daniel Yoo dyoo@hkn.EECS.Berkeley.EDU
Tue, 11 Jan 2000 11:30:55 -0800 (PST)


> Message: 3
> From: alan.gauld@bt.com
> To: tescoil@rtpro.net, tutor@python.org
> Subject: RE: [Tutor] Letter Frequency Count.
> Date: Tue, 11 Jan 2000 10:11:36 -0000
> 
> > # An uncertain-how-to-proceed effort to count the
> > # frequency of alphabetic characters in a file.
> 
> Might I suggest using a dictionary?

I think that sorting might help.  *grin*  In all seriousness, you might be
able to sort all the characters in the file, and find it easier to count
character frequencies in one pass through the sorted list.