title: In Python, why is list[] automatically global?
body: <p>This is a weird behavior.</p>
  <p>Try this :</p>
  <pre><code>rep_i=0
  print &quot;rep_i is&quot; , rep_i
  def test():
    global rep_i #without Global this gives error but list , dict , and others don't
    if rep_i==0:
      print &quot;Testing Integer %s&quot; % rep_i
      rep_i=1
    return &quot;Done&quot;
  
  rep_lst=[1,2,3]
   
  
  def test2():
    if rep_lst[0]==1:
      print &quot;Testing List %s&quot; % rep_lst
    return &quot;Done&quot;
  
  
  if __name__==&quot;__main__&quot;:
    test()
    test2()
  </code></pre>
  <p>Why list do not need to declare global? are they automatically global?</p>
  <p>I find it really weird, I use list most of the time and I don't even use global at all to us them as global...</p>