Answers for "python list comprehension make each string capitalize first letter only"

4

capitalize first letter of each word python

"hello world".title()
'Hello World'
>>> u"hello world".title()
u'Hello World'
Posted by: Guest on May-27-2020
0

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

my_list = ['apple pie', 'orange jam']
print my_list[0].capitalize()
Posted by: Guest on May-30-2020

Code answers related to "python list comprehension make each string capitalize first letter only"

Python Answers by Framework

Browse Popular Code Answers by Language