Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #capitalize #letter #list #python
ADD COMMENT
Topic
Name
1+1 =