title: Maximum sum sublist?
body: <p>I'm getting confused with this question at what it's trying to ask. </p>
  
  <blockquote>
    <p>Write function <code>mssl()</code> (minimum sum sublist) that takes as input a list
    of integers. It then computes and returns the sum of the maximum sum
    sublist of the input list. The maximum sum sublist is a sublist
    (slice) of the input list whose sum of entries is largest. The empty
    sublist is defined to have sum 0. For example, the maximum sum sublist
    of the list <code>[4, -2, -8, 5, -2, 7, 7, 2, -6, 5]</code> is <code>[5, -2, 7, 7, 2]</code>
    and the sum of its entries is <code>19</code>.</p>
  </blockquote>
  
  <p>If I were to use this function it should return something similar to</p>
  
  <pre><code>&gt;&gt;&gt; l = [4, -2, -8, 5, -2, 7, 7, 2, -6, 5]
  &gt;&gt;&gt; mssl(l)
  19
  &gt;&gt;&gt; mssl([3,4,5])
  12
  &gt;&gt;&gt; mssl([-2,-3,-5])
  0
  </code></pre>
  
  <p>How can I do it?</p>
  
  <p>Here is my current try, but it doesn't produce the expected result:</p>
  
  <pre><code>def mssl(x):
      ' list ==&gt; int '
      res = 0
      for a in x:
          if a &gt;= 0:
              res = sum(x)
          return res
      else:
          return 0
  </code></pre>