title: Python Requests - pass parameter via GET
body: <p>I am trying to call an API and pass some parameters to it.</p>
  
  <p>My endpoint should look like:</p>
  
  <p><a href="https://example.com?q=food" rel="noreferrer">https://example.com?q=food</a>
  food is the parameter</p>
  
  <pre><code>import requests
  parametervalue = "food"
  r = requests.get("https://example.com/q=", parametervalue)
  </code></pre>
  
  <p>When I do  print r.url, I do not get the correct result - the value is not passed.</p>
  
  <p>Updated:</p>
  
  <p>Error:</p>
  
  <pre><code>  r = requests.get('https://example.com', params={'1':parametervalue})
    File "/usr/lib/python2.7/dist-packages/requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  </code></pre>
  
  <p>Update:</p>
  
  <p>Answer posted below. Thank you.</p>
  
  <p>Note: The SSL error mentioned in the post was due to me running Python 2.7. I used python3 and it fixed the issue.</p>