title: How to index a value into string when it has multiple curly braces and %
body: <p>I want to place a value into a string, however I cannot access the string as a <code>f-string</code> because it has multiple curly braces, but also I cannot use the following <code>%s</code> to access a value in the string as it has multiple <code>%</code> operators.</p>
  <p>Here's an example string:</p>
  <pre><code>string = '{{id,name,tagline,frequency,duration,price,formattedPrice,pricePerUnit,formattedPricePerUnit}oneTimePurchase{index}}priceRange(withSubscriptionPriceRange:true),@include(if:$withPriceRange){fromPriceFormatted}discount{mode,value}currency,weight,seoJson}}}&amp;v=%7B%22slug%22%3A%22p8-by-olly-fathers%22%2C%22externalId%22%3A%22%22%2C%22withPriceRange%22%3Afalse%7D'
  </code></pre>
  <p>I wanted to include the following string:</p>
  <pre><code>firstRange
  </code></pre>
  <p>inside the following part of the string:</p>
  <pre><code>externalId%22%3A%22%2firstRange%2C%22withPriceRange%22%3Afalse%7D
  </code></pre>
  <p>I have tried using:</p>
  <pre><code>string % &quot;firstRange&quot;
  </code></pre>
  <p>Aftering inserting <code>%s</code> in the required position but I get the following error:</p>
  <pre><code>ValueError: unsupported format character 'B' (0x42)
  </code></pre>