s.substitute(who='tim', what='kung pao')
d = dict(who='tim')
Template('Give $who $100').substitute(d)
Template('$who likes $what').substitute(d)
Template('$who likes $what').safe_substitute(d)
Python- создание таблицы