Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

capiatlize first letter in list

    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
   
   Output:

   Johnny rotten, Eddie vedder, Kurt kobain, Chris cornell, Micheal phillips jagger
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #capiatlize #letter #list
ADD COMMENT
Topic
Name
9+4 =