Frage

I understand what the error is saying, I just don't understand why a function used on a string won't concatenate with a string or how to go about solving that issue. The code seems straight forward to me.

Here is the simplest code I made to test this.

word = word[0].upper() + word[1:].lower
War es hilfreich?

Lösung

You forgot the () after .lower:

word = word[0].upper() + word[1:].lower()
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top