[Tutor] Can't figure out why this is printing twice

Mike Hoy hoym74 at gmail.com
Mon Jun 8 11:57:47 CEST 2009


I have the following code:

import gzip
import datetime
date = datetime.date.today()
name = date.strftime('%m-%d-%Y')+'.gz'
date.strftime('%m-%d-%Y')+'.gz'
print "The name of the file will be", name

the output is:
The name of the file will be
The name of the file will be 06-08-2009.gz


I can't figure out why 'The name of the file will be' is printing twice. Any
help appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090608/761ca01b/attachment.htm>


More information about the Tutor mailing list