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
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