The problem with
% is that the arguments are a tuple. The following code works:
w = "world" print "Hello %s" % w
w was a tuple, it would raise a
The only way to make this safe is to do this:
print "Hello %s" % (w,)
string.format() doesn’t have this problem.