字符串常用操作之字母处理
.upper() .lower() .swapcase() .capitalize() .title() a='fheGifHF'
print(a.upper()) # 全部大写
print(a.lower()) # 全部小写
print(a.swapcase()) # 大小写互换
print(a.capitalize()) # 首字母大写,其余小写
print(a.title()) # 首字母大写

浙公网安备 33010602011771号