how to change the first letter of a string to uppercase in python code example
Example 1: capitalize string python
string = "this isn't a #Standard Sntence."
string.capitalize()
string.upper()
string.lower()
string.title()
from string import capwords
string = capwords(string)
string = " ".join(s.capitalize() for s in string.split())
Example 2: change to first letter capital list python
singers = ['johnny rotten', 'eddie vedder', 'kurt kobain', 'chris cornell', 'micheal phillip jagger']
singers = [singer.capitalize() for singer in singers]
print(singers)