Someone has recently demonstrated to me that we can print variables in Python like how Perl does.
Instead of:
print(\"%s, %s, %s\" % (foo, bar, baz))
I prefer the .format() method myself, but you can always do:
.format()
age = 99 name = "bobby" print name, "is", age, "years old"
Produces: bobby is 99 years old. Notice the implicit spaces.
bobby is 99 years old
Or, you can get real nasty:
def p(*args): print "".join(str(x) for x in args)) p(name, " is ", age, " years old")