title: Python how to pass variable between two def
body: <p>I would pass a variable between two def inside a function. How can i do? i tried using global but didn't work</p>
  
  <pre><code>class example:
  
   def funz1(self,q,b):
      global queue
      queue = []
      queue += [q]
      queue += [a]
  
   def funz2(self):
      return str(queue.pop())
  </code></pre>
  
  <p>but it said me that queue is an empty list</p>