Converting an intergar to a string
Eric Brunson
brunson at level3.net
Fri Jan 7 13:34:34 EST 2000
More flexible would be to start using the % construct early and get
used to it. It's very powerful.
print("Some Text %d Some more Text %s blah %3d" % (num1, string, num2))
"Wm. King" wrote:
>
> Hi: As I am relatively new to Python, I had asked basically the same
> question some time ago... Here is what I found:
>
> print "Some Text " + str(num) + "Some text"
>
> Hope this helps.
>
--
Eric Brunson * _ o *
brunson at brunson.com * / //\ Faster and faster,
brunson at l3.net \>>| * until the thrill of speed
\\, overcomes the fear of
death
More information about the Python-list
mailing list