s = '{name} has {n} messages.'
s.format(name='Guido', n=37)
'Guido has 37 messages.'
name = 'Guido'
n = 37
s.format_map(vars())
'Guido has 37 messages.'
"{0} xx {1}".format("sxx","xdsf")
s = '{name} has {n} messages.'
s.format(name='Guido', n=37)
'Guido has 37 messages.'
name = 'Guido'
n = 37
s.format_map(vars())
'Guido has 37 messages.'
"{0} xx {1}".format("sxx","xdsf")