def is_valid_index (wordsearch, line_num, col_num):
        """Checks if the provided line number and column number are valid"""
        if ((line_num >= 0) and (line_num < len(wordsearch))):
                if ((col_num >= 0) and (col_num < len(wordsearch[line_num]))):
                        return True
        return False