mirror of
https://github.com/Xevion/exercism.git
synced 2025-12-06 01:14:56 -06:00
3 lines
224 B
Python
3 lines
224 B
Python
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) |