longvalue = 9999999999999L print "%3ld" % 42 print "%d" % 42 print "%d" % 42.0 print "%d" % longvalue print "%07.2f" % 42 print "%07.2F" % 42 print "%(foo)s" % { 'foo': 'bar' } #print "%((foo))s" % { '(foo)': 'bar' } print "%sx" % (103*'a')