demo_string_formatting5.py:
age = 36 name = "John" txt = "His name is {1}. {1} is {0} years old." print(txt.format(age, name))
➜ begtut>python demo_string_formatting5.py
His name is John. John is 36 years old.