On 03/29/2011 03:41 PM, Prasad, Ramit wrote: > Is there a difference (or preference) between using the following? > "%s %d" % (var,num) > VERSUS > "{0} {1}".format(var,num) > > > Ramit
If you're using Python 3, use the second one. If you're using Python 2, you have no option but to use the first, as far as I know. Maybe Python 2.7 has that formatting, I'm not sure. -- Corey Richardson _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor