title: list in a function keeps it content in different functions
body: <p>so i have some function like this:</p>
  <pre><code>def func(ls=[]):
      for i in range(10):
          ls.append(i)
      print(ls)
  </code></pre>
  <p>in its arguments, the function stores some list that may be blank or if you set its value then it will become something else</p>
  <p>so i expect that after calling it 2 times with blank arguments like this:</p>
  <pre><code>func()
  func()
  </code></pre>
  <p>it will print</p>
  <pre><code>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  </code></pre>
  <p>but instead it prints</p>
  <pre><code>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  </code></pre>
  <p>i do understand how to fix it, but i don't understand <strong>why it happens</strong>.</p>