title: How to get each row in Python?
body: <p>I need to do this:</p>
  
  <pre><code>"""
  Program a function
  
      def increasing (m)
  </code></pre>
  
  <p>that will be able, for any matrix m of positive integers, to check whether the sums of the rows in this array are increasing.</p>
  
  <pre><code>examples
  1 3 2 5        The sums of the rows        2 8 4 1        The sums of the rows
  7 9 4 1        are 11, 21 and 23.          6 2 8 5        are 15, 21 and 15.
  3 5 6 9        --&gt; increasing              8 4 2 1        --&gt; not increasing
  """
  </code></pre>
  
  <p>So, I want to use <code>sum()</code>, which is perfectly doable, I guess.</p>
  
  <p>I started like this:</p>
  
  <pre><code>def increasing (m):
      for row in m:
          row[1]
  </code></pre>
  
  <p>But I know that row[1] will just output the numbers in <strong>index</strong> 1 of each row. What I have in my mind is this:</p>
  
  <pre><code>def increasing (m):
      for row in m:
          if sum(row)[first_row] &gt; sum(row)[second_row]:
             return False
  </code></pre>
  
  <p>But that is just slicing it, so I don't know how to count the rows so that I can compare them.</p>
  
  <p>I don't want to use any module or whatsoever, just plain simple Python. Can someone point me in the right direction? I just need it to be as simple as possible.</p>
  
  <p>Input format sample:</p>
  
  <pre><code>increasing_l = [
      [1, 3, 2, 5],
      [7, 9, 4, 1],
      [3, 5, 6, 9]
  ]
  
  not_increasing_l = [
      [2, 8, 4, 1],
      [6, 2, 8, 5],
      [8, 4, 2, 1]
  ]
  
  test1 = increasing(increasing_l)
  test2 = increasing(not_increasing_l)
  
  print "should be True: %s" % test1
  print "should be False: %s" % test2
  </code></pre>