newbie question

The1Eagle the1eagle at
Fri Nov 2 06:48:21 CET 2001

Hello All,
I am trying to read in a file and place each word in the file into an array or
list so that those words can be manipulated (ie alphabetized, counted, deleted,
compared, etc).  For some reason I can seem to find a way to get split to work
in this manner.  Any ideas?  Here is the code so far, but this may be the wrong
approach.  Thanks.

#function that does all the work
def handledata(input):
    text = input.readlines()
    #need to parse text.  Would be nice to have \n and other punctuation
#main routine
input = open("\\textfile.txt")

More information about the Python-list mailing list