首页 > 技术文章 > python中如何让一个字符串第一个字母大写
GY-Zhu 2018-09-10 17:46 原文
eg: s="hello"
想让s变成"Hello",此时可以考虑函数 capitalize() 可以让第一个字母大写
print(s.capitalize())