[Tutor] print array

Fangwen Lu lufangwen at gmail.com
Wed Sep 26 19:17:11 CEST 2007


Dear all-

Let a=(3,4,7), b=[3,4,7].
If I type
print '%d + %d = %d' %(a)
I get
3 + 4 = 7

But if I type  print '%d + %d = %d' %(b), I get errors.

If there is a way for doing this kind of type dirrectly from array.

Thank you!

Fangwen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070926/993f8477/attachment.htm 


More information about the Tutor mailing list