title: I'm having hard time telling these two python codes apart
body: <p>(1)</p>
  <pre><code>s = '357827351092'
  l = []
  for i in s:
      if int(i) &gt; 5:
      l.append(i)
  print(l)
  </code></pre>
  <p>(2)</p>
  <pre><code>s = '357827351092'
  for i in s:
      l = []
      if int(i) &gt; 5:
      l.append(i)
  print(l)
  </code></pre>
  <p>The output of the first code is as expected but the second one prints an empty list. What made it empty?. I thought they would both have the same output.</p>