小册名称:Python合辑4-130个字符串操作示例
在 Python 中将字符串大写
x = 'canada'x = x.capitalize()print(x)
x = 'canada'
x = x.capitalize()
print(x)
Output:
Canada