Python: Inserting variables into a string without order
<p>Is it possible to inject variable values into strings without knowing the order?<br>
I'm familiar with </p>

<pre><code>"% world" % "Hello"
</code></pre>

<p>syntax, but is there anything comparable to</p>

<pre><code>string = "Order id %{order.id}, price: %price" % (price, order)
</code></pre>

<p>I'm asking because I'd like to have a list of strings with inconsistant use of variables, and their placement, and I want to substitute them all inside of a function.</p>
