|
|
|
|
|
by andrewaylett
5150 days ago
|
|
Python supports `"%(name)s"`, which means you're not dependent on order at all -- in my opinion, much nicer than indexing into the parameter list: >>> "%(name)s has %(count)d %(thing)s" % {'thing': 'bananas', 'count': 10, 'name': "Phil"}
'Phil has 10 bananas'
|
|