string formatter for tuple

jeremito jeremit0 at gmail.com
Thu Nov 2 17:41:13 CET 2006


skip at pobox.com wrote:
> >>>>> "Tim" == Tim Chase <python.list at tim.thechases.com> writes:
>
>     >> How can I print a tuple with a single string format?
>
>     Tim>        print "a = %s" % str(a)
>     Tim> or
>     Tim>        print "a = %s" % repr(a)
>
> Or wrap the tuple in a tuple:
>
>     print "a = %s" % (a,)
> 
> Skip

Thank you all very much for your help.
Jeremy




More information about the Python-list mailing list