I use the format:
foo = 'foo'
bar = 'bar'
print "%(foo)s%(bar)s" % locals()
which I guess is what this is similar too.
basically locals(), vars(), and globals() I find very useful for string formatting.
basically locals(), vars(), and globals() I find very useful for string formatting.
No comments yet.