Try:
afile = open(filename)
lines = afile.readlines()[:-1] # assigns all except the last element to
a list "lines"
for line in lines:
    print line

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to