I see now, that example helps. Basically I use one asterisk to extract a list or a tuple and double asterisks for a dictionary, but I have to provide keys in case of a dictionary, like here:
>>> template = '{motto}, {pork} and {food}' >>> a = dict(motto='spam', pork='ham', food='eggs') >>> template.format(**a) 'spam, ham and eggs' Thanks for clearing things up.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor