title: Global and local scope variables in Python; Delete item inside from array inside the loop
body: <p>This is the code:</p>
  
  <pre><code>def deleteObj(array):
      for i in range (0, len(array)):
          if array[i]:
              if type(array[i]) == int or type(array[i]) == float:
                  if int(array[i]) == 0:
                      del array[i]
          elif not array[i]:
              break
  
      print(array)
  </code></pre>
  
  <p>So, at the end it prints me whole array without changes. I've broke my mind already xDxDxD<br/>
  P.S. I can't make array a global variable before posting inside function</p>