title: Checking row and column for a word in python
body: <p>I am trying to create a checking program to see if the word is in a matrix horizontally or vertically. I have the code for checking the row, but would checking the column be similar to the row code?</p>
  
  <pre><code>def checkRow(table, r, pos, word):
      for i in range(0, len(word)):
          if table[r][pos+i] != word[i]:
              return False
      return True
  </code></pre>
  
  <p>a sample table would be like this:</p>
  
  <pre><code>[
    ['a','p','p','l','e','b'],
    ['u','y','c','v','a','s'],
    ['n','u','t','o','n','s'],
    ['t','n','c','v','d','b'],
    ['o','r','i','x','o','f'],
    ['e','a','t','i','n','g']
  ]
  </code></pre>