title: Python: TypeError: cannot unpack non-iterable int object
body: <p>code for finding the large sum in the array:</p>
  
  <pre><code>def maxsum(arry):
      if len(arry)==0:
          return 0
      summ,maximum_sum=0
      for i in arry:
          summ=summ+i
          maximum_sum=max(summ,maximum_sum)
      return maximum_sum    
  maxsum([1,2,-1,-2])
  </code></pre>
  
  <p>getting the following error: <code>TypeError</code></p>
  
  <pre><code>Traceback (most recent call last)
  &lt;ipython-input-5-59dc92538282&gt; in &lt;module&gt;
        7         maximum_sum=max(summ,maximum_sum)
        8     return maximum_sum
  ----&gt; 9 maxsum([1,2,-1,-2])
       10 
  
  &lt;ipython-input-5-59dc92538282&gt; in maxsum(arry)
        2     if len(arry)==0:
        3         return 0
  ----&gt; 4     summ,maximum_sum=0
        5     for i in arry:
        6         summ=summ+i
  
  TypeError: cannot unpack non-iterable int object
  </code></pre>