Use the Python implementation to capitalize the first letter of each item in list

  • 2021-06-28 09:25:23
  • OfStack

As follows:


L = ['adam', 'Lisa', 'bart', 'Paul']
m=0
for i in L:
  L[m]=i[0].upper()+i[1:]
  m=m+1
for index, name in enumerate(L):
  print (index, '-', name)

Related articles: