demo_string_placeholder10.py:
#Use "b" to convert the number into binary format: txt = "The binary version of {0} is {0:b}" print(txt.format(5))
➜ begtut>python demo_string_placeholder10.py
The binary version of 5 is 101