Scrabble- code not working


I don't understand why my code is not working:
the indentations are all correct, they are just not showing up here. Please help?

def scrabble_score(word):
    word=raw_input("Please enter a word")
    for i in range(0,l+1,-1):
         for letter in word:
            for letter in score:
    return total


Technically that loop is not needed.

    for letter in word:
        total += score[letter]

Here is a pattern to study:

return sum([score[i.lower()] for i in word])

Not to make a point, but to reverse engineer and compare to your code.


when I remove the
for letter in word
loop, it still won't give me the results! Is there something else wrong in the code?


It should give results since the code is fine. Are you wondering why it works? Are you getting any error messages?