Source

Python 3 Patterns & Idioms / code / PythonForProgrammers / stringFormatting.py

Full commit
1
2
3
4
5
6
# QuickPython/stringFormatting.py
val = 47
print("The number is %d" % val)
val2 = 63.4
s = "val: %d, val2: %f" % (val, val2)
print(s)