title: How can I put text efficient in sub lists inside a list? (Python)
body: <p>I wrote some code to calculate the maximum path sum of a triangle. This is the triangle:</p>
  <pre><code>    75
     95 64
    17 47 82
   18 35 87 10
  20 04 82 47 65
  </code></pre>
  <p>So the maximum path sum of this triangle is: <code>75+95+82+87+82 = 418</code></p>
  <p>This is my code to calculate it:</p>
  <pre><code>lst = [[72], 
      [95,64], 
      [17,47,82], 
      [18,35,87,10],
      [20,4,82,47,65]]
  something = 1
  i = 0
  mid = 0
  while something != 0:
      for x in lst:
          new = max(lst[i])
          print(new)
          i += 1
          mid += new
      something = 0
  print(mid)
  </code></pre>
  <p>As you can see I put every item of the triangle down in lists and put the lists in a (head) list. This are not a lot numbers, but what if I have a bigger triangle? To do it manually is  a lot of work. So my question is: <strong>How can I put the numbers from the triangle efficient in sub lists inside a head list?</strong></p>