Change To First Letter Capital List Python

[Solved] Change To First Letter Capital List Python | Python - Code Explorer | yomemimo.com
Question : how to capitalize the first letter in a list python

Answered by : xenophobic-xenomorph-izmwoidu8qis

 singers = ['johnny rotten', 'eddie vedder', 'kurt kobain', 'chris cornell', 'micheal phillip jagger'] singers = [singer.capitalize() for singer in singers] print(singers) #instead of capitalize use title() to have each word start with capital letter

Source : https://stackoverflow.com/questions/29334276/capitalize-first-letter-of-the-first-word-in-a-list-in-python | Last Update : Sun, 26 Apr 20

Question : how to capitalize first letter in python in list using list comprehension

Answered by : blueeyed-beaver-ixhgngr548k4

my_list = ['apple pie', 'orange jam']
print my_list[0].capitalize()

Source : https://stackoverflow.com/questions/29334276/capitalize-first-letter-of-the-first-word-in-a-list-in-python | Last Update : Sat, 06 Jun 20

Answers related to change to first letter capital list python

Code Explorer Popular Question For Python