Wesley C. wrote: > > > The code I have is here: > > > > > > #!/usr/bin/python > > > > > > file = open('testfile.txt', 'r') > > > for line in file.readlines(): # read file > > > s = line[:-1] # get rid of newline > > > print s #print string > > > file.close() Not good, sometimes the last line doesn't end in a newline. regards, Gerrit Holl.