How about this?
print ("%s" * len(vars)) % tuple(vars)
Indeed, this is a pretty dumb way to do something. If you just want to crush all the variables together in one big line, this is probably the best idea:
print ''.join(str(x) for x in vars)
This requires at least Python 2.4.
source
share