-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