题解 | Python的字符串大小写转换和首字母大写方法

格式化输出(二)

https://www.nowcoder.com/practice/3bd78a6de34a447fa49571a03f164fd3

import sys
st=input()
print(st.lower())
print(st.upper())
print(st.title())

for line in sys.stdin:
    a = line.split()
    print(int(a[0]) + int(a[1]))
  1. 所有字母大写:upper()
  2. 所有字母小写:lower()
  3. 首字母大写:capitalized()
  4. 每个单词首字母大写:title()
全部评论

相关推荐

04-27 15:01
早稲田大学 Java
牛客72191338...:可能是时间点的问题,四月底机会确实会相对少点,但佬这个学历摆在这,会有机会的
简历中的项目经历要怎么写
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务