[Tutor] Trying to extract the last line of a text file
jordangreenberg at gmail.com
Thu Oct 19 21:26:51 CEST 2006
Chris Hengge wrote:
> Not to hijack the thread, but what stops you from just putting a
> after your example line?
Because file is a class.
file(filename) creates a file object, but he's not saving the object to
a variable, so its lost. file.close() takes a file object as a
parameter, but theres no object left to pass it.
More information about the Tutor