Take 3 - multiple arguments to str()
Skip Montanaro
skip at pobox.com
Sun Dec 23 10:04:01 EST 2001
More information about the Python-list mailing list
Sun Dec 23 10:04:01 EST 2001
- Previous message (by thread): Take 3 - multiple arguments to str()
- Next message (by thread): OT: Good Comparison Java vs C#
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Oren> The multiple argument version of str may be used to defeat the
Oren> print statement's automatic spacing and for general formatting of
Oren> strings with embedded expressions.
Oren> print str("X=",x," Y=",calc_y(x))
Why bother? Print is a convenience. If you need precise control you can
either use %-formatted strings or the file object's write method.
Seems unnecessary to me.
--
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)
- Previous message (by thread): Take 3 - multiple arguments to str()
- Next message (by thread): OT: Good Comparison Java vs C#
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list