Steve Crook wrote:
On Mon, 6 Jun 2011 12:15:35 -0400, Jabba Laci wrote in
Message-Id: <mailman.2490.1307376958.9059.python-l...@python.org>:
solo = 'Han Solo'
jabba = 'Jabba the Hutt'
print "{solo} was captured by {jabba}".format(solo=solo, jabba=jabba)
# Han Solo was captured by Jabba the Hutt
How about:-
print "%s was captured by %s" % (solo, jabba)
Or even
print "{} was captured by {}".format(solo, jabba)
or how about
print "{victim} was captured by {captor}".format(
victim=solo, captor=jabba)
or maybe
print "{hapless_twit} was captured by {mega_bad_dude}".format(
hapless_twit=solo, mega_bad_dude=jabba)
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list