title: How does Python know I want to double number I did not define? (Beginner)
body: <pre><code>x = 10
  def double(y):
      return 2 * x
  print(double(x))
  </code></pre>
  <p>Output is 20
  As far as I know, it should return None because in function &quot;double&quot; I double x which is undefined that block.</p>