At 05:41 PM 5/6/2008, Kent Johnson wrote:
On Tue, May 6, 2008 at 5:41 PM, Dick Moores <[EMAIL PROTECTED]> wrote:
>
> The function is now:
>
>
> def printResult(date1, date2, days1, weeks, days2):
> print "\nThe difference between %s and %s is %d days" %
(date1.strftime("%m/%d/%Y"),
> date2.strftime("%m/%d/%Y"), days1)
> line1 = "\nThe difference between %s and %s is %d days" %
((date1.strftime("%m/%d/%Y"), date2.strftime("%m/%d/%Y"), days1))
There is no need to compute this string twice, just use
line1 = ...
print line1
Oh, of course. Thanks for pointing that out.
Dick
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor