Question : python capitalize first letter of string without changing the rest
Answered by : stormy-seal-ryy084e6fewu
string[0].upper() + string[1:]
Source : https://stackoverflow.com/questions/31767622/capitalize-the-first-letter-of-a-string-without-touching-the-others | Last Update : Thu, 05 Nov 20
Question : first letter uppercase rest lowercase python
Answered by : helpless-hamster-iyyzaozffwgx
>>> "hello world".title()
'Hello World'
>>> u"hello world".title()
u'Hello World'
Source : https://stackoverflow.com/questions/1549641/how-can-i-capitalize-the-first-letter-of-each-word-in-a-string | Last Update : Tue, 28 Jun 22
Question : python lowercase first letter
Answered by : vastemonde
def decapitalize(str): return str[:1].lower() + str[1:]
print( decapitalize('Hello') ) # hello
Source : | Last Update : Tue, 23 Feb 21
Question : python string first letter uppercase and second letter in lowercase
Answered by : quaint-quoll-tf0m8kr4sbke
x = "string"
y = x[:3] + x[3].swapcase() + x[4:]
Source : https://stackoverflow.com/questions/15858065/python-how-to-capitalize-nth-letter-of-a-string | Last Update : Thu, 24 Mar 22