Re: Struggling with sorted dict of word lengths and count

2011-06-27 Thread Chris Angelico
On Tue, Jun 28, 2011 at 3:00 AM, Cathy James wrote: > for word in line.lower().split( ):#split lines into words and make lower > case By the way, side point: There's not much point lower-casing the line when all you care about is the lengths of words :) ChrisA -- http://mail.python.org/mailman/

Re: Struggling with sorted dict of word lengths and count

2011-06-27 Thread Chris Angelico
On Tue, Jun 28, 2011 at 3:00 AM, Cathy James wrote: > def fileProcess(filename = open('input_text.txt', 'r')): >     for line in filename: >     for word in line.lower().split( ):#split lines into words and make > lower case >     wordlen = word_length(word)#run function to return leng