':type words: List[str]
:rtype: bool'

def validWordSquare(self, words):

    for i in xrange(len(words)):
        for j in xrange(len(words[i])):
            if ((j >= len(words)) or (i >= len(words[j])) or (words[j][i] != words[i][j])):
                return False
    return True
