examples/strings/printf.py
#!/usr/bin/env python
from __future__ import print_function, division

v = 65
print("<%s>" % v)     # <65>
print("<%10s>" % v)   # <      65>
print("<%-10s>" % v)  # <65      >
print("<%c>" % v)     # <A>
print("<%d>" % v)     # <65>
print("<%0.5d>" % v)  # <00065>

...but the format method is preferable!