title: Adding a list within a list in python
body: <p>I am new to programming and trying to understand the syntax.</p>
  
  <p>in my example, i would like to have a result of: table = [[1,2,3], [2,4,6], [3,6,9]]
  but somehow i get and empty list. I am not sure where to fix it.</p>
  
  <pre><code>row = [1, 2, 3]
  col = [1, 2, 3]
  li = []
  table = []
  for x in row:
      for n in col:
          li.append(x*n)
      table.append(li)
      li.clear()
  
  print(table)
  </code></pre>