print "%+d" % 4 print "%+d" % -4 print "we are at %d%%" % 100 print 'Your host is: %s' % 'earth' print 'Host: %s\tPort: %d' % ('mars', 80) num = 123 print 'dec: %d/oct: %#o/hex: %#X' % (num, num, num) print "MM/DD/YY = %02d/%02d/%d" % (2, 15, 67) w, p = 'Web', 'page' print 'http://xxx.yyy.zzz/%s/%s.html' % (w, p)