Print

Print


(This was requested at the meeting today)

Current docs:
http://docs.python.org/2/library/string.html

# old style
"Hello %s" % ("Andy")

# 'new style', proposed: http://legacy.python.org/dev/peps/pep-3101/
"Hello {0}, nice {1} we're having.".format("Andy", "meeting")
"Hello {}, how 'bout them {}".format("Andy", "Cardinals")
info = {"name" : "Andy"}
"Hello {name}".format(**info)

# template-based: http://legacy.python.org/dev/peps/pep-0292/
Template("Hello $name").substitute(name="Andy")

----
-Daniel

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1