Stef Mientki schrieb: > hello, > > > As part of a procedure I've a number sequences like this: > > <Python> > if Print_Info: print Datafile.readline() > else: Datafile.readline() > </Python> > > Is there a more compressed way to write such a statement, > especially I dislike the redundancy "Datafile.readline()".
d=Datafile.readline() if Print_info: print d It's still two lines, but only has a single call to .readline(). HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list