title: Invalid Format Specifier with python3 F-strings
body: <p>I have a small script where I am trying to embed string variable in a string for a post request. The issue I am having is that when I use the f-string formatting I am getting the below error.</p>
  <pre><code>richard@kali:~/Dropbox/offsec/Code/5_Bassmaster$ ./bassmaster.py 192.168.1.101
  Traceback (most recent call last):
    File &quot;./bassmaster.py&quot;, line 15, in &lt;module&gt;
      json = f'{&quot;requests&quot;: [{request_1}, {request_2}, {request_3}]}'
  ValueError: Invalid format specifier
  </code></pre>
  <p>This is my code. From what I understand it should be embedding said strings but I can't get rid of the error. I have tried using the <code>^</code> character as suggested <a href="https://stackoverflow.com/questions/29044940/how-can-you-use-a-variable-name-inside-a-python-format-specifier">here</a> but it doesn't resolve the issue.</p>
  <pre><code>#!/usr/bin/python3
  
  import requests,sys
  
  if len(sys.argv) != 2:
      print(f&quot;(+) usage: {sys.argv[0]} &lt;target&gt;&quot;) 
      sys.exit(-1)
  
  target = f&quot;http://{sys.argv[1]}:8080/batch&quot;
  
  request_1 = '{&quot;method&quot;:&quot;get&quot;,&quot;path&quot;:&quot;/profile&quot;}' 
  request_2 = '{&quot;method&quot;:&quot;get&quot;,&quot;path&quot;:&quot;/item&quot;}' 
  request_3 = '{&quot;method&quot;:&quot;get&quot;,&quot;path&quot;:&quot;/item/$1.id&quot;}'
  
  json = f'{&quot;requests&quot;: [{request_1}, {request_2}, {request_3}]}'
  r = requests.post(target, json)
  
  print(r.text)
  </code></pre>