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
Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor