📌  相关文章
📜  更改为首字母大写列表 python 代码示例

📅  最后修改于: 2022-03-11 14:47:10.241000             🧑  作者: 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