title: How does this Python Hackerrank function work?
body: <p>I am a complete beginner in terms of programming and I just started learning my first language, which is Python. Lately, I've been practising solving problems in Hackerrank and I got stuck at some "diagonal difference" problem.</p>
  
  <p>The problem is completely new to me so I search the web for some answers and come across with this function that somebody made in github.</p>
  
  <pre><code>
      def diagonalDifference(arr):
          prim =0
          sec=0
          length = len(arr[0])
          i=0                           #what does i=0 even do here?
          for count in range(length):
              prim += arr[count][count] #don't understand what "[count][count]" mean
              sec += arr[count][(length-count-1)] #don't understand this either
          return abs(prim-sec)
  
  </code></pre>