字符转化为大写函数 upper() 字符转化为小写函数 lower()
首字母大写的函数分为:
| 函数名 | 含义 | 示例 |
|---|---|---|
| title() | 标题首字母大写|输入 test case 输出 Test Case | |
| capitalize() | 首字母大写 其余全部小写|输入 test case 输出 Test case |
a=input()
print (a.lower())
print (a.upper())
print (a.title())

字符转化为大写函数 upper() 字符转化为小写函数 lower()
首字母大写的函数分为:
| 函数名 | 含义 | 示例 |
|---|---|---|
| title() | 标题首字母大写|输入 test case 输出 Test Case | |
| capitalize() | 首字母大写 其余全部小写|输入 test case 输出 Test case |
a=input()
print (a.lower())
print (a.upper())
print (a.title())