scrabble score

This commit is contained in:
Xevion
2019-07-13 17:35:02 -05:00
parent f127035e22
commit 74f8471f61
4 changed files with 137 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
dat = [('AEIOULNRST', 1), ('DG', 2), ('BCMP', 3), ('FHVWY', 4), ('K', 5), ('JX', 8), ('QZ',10)]
def score(word):
return sum([subarr[1][1] for subarr in enumerate(dat) if char.upper() in subarr[1][0]][0] for char in word)