📌  相关文章
📜  如何将列表中的第一个字母大写python代码示例

📅  最后修改于: 2022-03-11 14:47:13.803000             🧑  作者: Mango

代码示例1
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