Terry Reedy wrote: > Peter Otten wrote: > >>>> Will your program handle empty lines of input correctly? >>> Strangely enough, it seems to do so, but why? >> >> Because there aren't any. When you read lines from a file there will >> always be at least the newline character. Otherwise it would indeed fail: > > Except possibly for the last line.
It may not end with a newline, but it will still contain at least one character. -- http://mail.python.org/mailman/listinfo/python-list