Scrabble score


#1

def scrabble_score(word):
total = 0
for i in word.lower():
total += score.get(i)
return total

This is how I solved the scrabble score, but I was wondering if there was a better/ more efficient way.
I really don't like having to define total and set it to 0, is there some alternate method that's better?


#2

Hello, I did it using the same way. I suppose this is the shortest way :smile:


#3

i did:

def scrabble_score(word):
    word_list = list(word)

    total_score = 0

    for char in word_list:
        total_score += score[char.lower()]

    return total_score