-1
def in_puzzle_horizontal(puzzle, word):
left_right = lr_occurrences(puzzle, word)
right_left = lr_occurrences((rotate_puzzle(rotate_puzzle(puzzle))), word)
total = left_right or right_left
if total > 0:
return True
else:
return False
为什么不'返回总> 0' –
我要投票因为它属于代码审查,因此将其作为题外话题来关闭。 – pacholik