title: trying to make a pyramid with nested list with sub-list lengths increasing by 1
body: <p>I am doing this assignment for a python course but I am nowhere near the solution.</p>
  <p>Let's say if I enter x = 4, this is what I am supposed to get:</p>
  <pre><code>        &quot;pyramid(0) =&gt;&quot; [ ]
          &quot;pyramid(1) =&gt;&quot; [ [1] ]
          &quot;pyramid(2) =&gt;&quot; [ [1], [1, 1] ]
          &quot;pyramid(3) =&gt;&quot; [ [1], [1, 1], [1, 1, 1] ]
  </code></pre>
  <p>I believe the logic is similar when making triangle's right side, right?</p>
  <p>this is my code, but I am missing something, hope you guys could point me to the right direction and the task's logic.
  Thank you!</p>
  <pre><code>x = 4
  list1 = []
  line = 0
  while line &lt; x:
      one = line + 1
      while one &gt; 0:
          list1.append(1)
          one -= 1
      line += 1
      print(list1)
  </code></pre>