Answers for "how to capitalize the first letter in a list python"

0

how to capitalize the first letter in a list python

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
Posted by: Guest on April-19-2020

Code answers related to "how to capitalize the first letter in a list python"

Python Answers by Framework

Browse Popular Code Answers by Language