假设在函数中调用的函数正常工作(确实如此)。我在这里做错了什么?
def board_contains_word_in_column(board, word):
""" (list of list of str, str) -> bool
Return True if and only if one or more of the columns of the board
contains word.
Precondition: board has at least one row and one column, and word is a
valid word.
>>> board_contains_word_in_column([['A', 'N', 'T', 'T'], ['X', 'S', 'O', 'B']], 'NO')
False
"""
for char in range(len(board)):
if word in make_str_from_column(board,char):
return True
return False