eg: s="hello" 想让s变成"Hello",此时可以考虑函数 capitalize() 可以让第一个字母大写 print(s.capitalize()) 转载于:https://www.cnblogs.com/GY-Zhu/p/9621351.html