[Tutor] Beginners question

Alex Kleider akleider at sonic.net
Sat Apr 4 21:53:51 EDT 2020


I've been surprised not to have seen, in this thread, any mention made 
of the following use pattern:

print("{first} {last}, {address}, {city}, {province}, {code}, 
{country}".format(**record))

Is this possible with any of the other (is it three) formatting methods?
It's a pattern I've come to appreciate very very much.

PS it is of course assumed that 'record' is a dict with values for keys 
'first', 'last', ....


More information about the Tutor mailing list