Skip to content

Instantly share code, notes, and snippets.

{
"editor.rulers": [120],
"editor.tabSize": 3,
"editor.renderIndentGuides": true,
"files.exclude": {
"dist/*": true,
"node_modules/*": true,
"bower_components/*": true
},
"vim.leader": ",",
def count_word_in_puzzle(word, puzzle):
count = 0
for i in (puzzle + zip(*puzzle)):
w = ''.join(i)
if word in w or word in w[::-1]:
count += 1
return count
puzzle = [