What is the difference between these two?


#1


Please see below.

What is the difference between "str(word.lower())" and "str.lower(word)"?
I found that they both work in this question.


#my code
def scrabble_score(word):
    a=0
    for i in **str(word.lower()):** 
        a=a+score[i]
    return a

the code which also works

   **str.lower(word)**


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.