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/
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
Dear Python Programmers,
I am a Python newby and I need help with my code: I have done parts of it
but I can't get what I need: I need to manipulate text to come up with word
lengths and their frequency:ie
how many 1-letter words in a text
how many 2-letter words in a text, etc
I believe I am on