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

txt = "Some text"
num = 42.12

print("'{}'{}'".format(txt, num))   # 'Some text'42.12'
print("'{0}'{1}'".format(txt, num)) # 'Some text'42.12'

print("'{1}'{0}'".format(txt, num)) # '42.12'Some text'
print("'{0}'{0}'".format(txt, num)) # 'Some text'Some text'
examples/strings/formatted_index_string.py
#!/usr/bin/env python
from __future__ import print_function, division

txt = "Some text"
num = 42.12

print("{message}  {age}".format(message = txt, age = num))
      # Some text  42.12
examples/strings/formatted_attributes.py
#!/usr/bin/env python
from __future__ import print_function, division
import sys

txt = "Some text"
num = 42.12

print("{1.executable}, {0}".format(txt, sys))
    #  /usr/local/opt/python/bin/python2.7, Some text
print("{system.argv[0]}, {text}".format(
    text = txt, system = sys)) #  formatted_indexing.py, Some text