psf/black code formatting (#1277)

This commit is contained in:
William Zhang
2019-10-05 01:14:13 -04:00
committed by Christian Clauss
parent 07f04a2e55
commit 9eac17a408
291 changed files with 6014 additions and 4571 deletions

View File

@ -28,23 +28,21 @@ def solution():
162
"""
script_dir = os.path.dirname(os.path.realpath(__file__))
wordsFilePath = os.path.join(script_dir, 'words.txt')
wordsFilePath = os.path.join(script_dir, "words.txt")
words = ''
with open(wordsFilePath, 'r') as f:
words = ""
with open(wordsFilePath, "r") as f:
words = f.readline()
words = list(map(lambda word: word.strip('"'), words.strip('\r\n').split(',')))
words = list(map(lambda word: word.strip('"'), words.strip("\r\n").split(",")))
words = list(
filter(
lambda word: word in TRIANGULAR_NUMBERS,
map(
lambda word: sum(map(lambda x: ord(x) - 64, word)),
words
)
map(lambda word: sum(map(lambda x: ord(x) - 64, word)), words),
)
)
return len(words)
if __name__ == '__main__':
if __name__ == "__main__":
print(solution())