The code I currently have makes it so that the entire word is capitalised instead of just the first letter which is what I am trying to accomplish.
https://i.stack.imgur.com/4FgE7.png
CodePudding user response:
word = "pinklemon1998"
_word = word[0].upper() word[1:]
Or as mentioned in the comments:
_word = word.title()
CodePudding user response:
There is a nice method for str
called .capitalize()
word = "hello"
word.capitalize()