return statement in functions
Jp Calderone
exarkun at intarweb.us
Tue Dec 23 11:06:09 EST 2003
On Tue, Dec 23, 2003 at 11:02:28AM -0500, Jp Calderone wrote:
>
> def report(*work):
> outputFile = open('report.txt', 'w')
> for f in work:
> outputFile.write(str(work()) + '\n')
> outputFile.close()
Of course, I meant to be calling "f()" in the loop.
Jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20031223/e3abecb7/attachment.sig>
More information about the Python-list
mailing list