n00b question: Possible to pass lists to a Template class?
wells at submute.net
Wed May 13 18:22:32 CEST 2009
On May 13, 11:14 am, Wells <we... at submute.net> wrote:
> Is it possible to pass a list to the Template.substitute method and
> use that in the template, like so..
> g = string.Template(gametemplate)
> print g.substitute(recap = "none", winner = game["winner"], loser =
> Then in the template...
> Where winner.team would be the value of game["winner"]["team"].
Sorry, I meant dicts, not lists. Like I said, n00b question.
More information about the Python-list