Answers for "first letter upper python"

4

capitalize first letter of each word python

"hello world".title()
'Hello World'
>>> u"hello world".title()
u'Hello World'
Posted by: Guest on May-27-2020
2

python lowercase first letter

def decapitalize(str):
    return str[:1].lower() + str[1:]

print( decapitalize('Hello') )          # hello
Posted by: Guest on February-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language