title: Don't understand why UnboundLocalError occurs in list comprehension
body: <pre><code>x = int(input())
  y = int(input())
  z = int(input())
  n = int(input())
  print([[x,y,z] for x in range(0,x+1,1) for y in range(0,y+1,1) for z in range(0,z+1,1) if (x+y+z)!=n])
  </code></pre>
  <p>The above program shows &quot;UnboundLocalError: local variable 'y' referenced before assignment&quot; error</p>