title: Why there is an unbound variable error warning by IDE in this simple python function
body: <p>Very simple question, but I can't find the answer to it. My IDE vs code (pylance) give me the warning/hint for <code>a</code> being possibly unbound. Why is this? How do I fix it?</p>
  <pre><code>def f():
      for i in range(4):
          a = 1
          print(a)
  
      return a
  </code></pre>