Stupid string formatting question

David K. Trudgett dkt at registriesltd.com.au
Thu May 16 21:38:55 EDT 2002


On Friday 2002-05-17 at 01:19:59 -0000, Michael S. Fischer wrote:

> Why can't I do this?
> 
>     def foo(x):
>       # Do some operations on x yielding a and b
>       return a, b
> 
>     print "a = %s, b = %s" % (foo(x))

Leave out the parentheses around foo(x):

     print "a = %s, b = %s" % foo(x)


David Trudgett





More information about the Python-list mailing list