2022年11月23日

摘要: zfill为字符串定义长度,如不满足,缺少的部分用0填补 用法 newstr = string.zfill(width) width:新字符串希望的宽度 注意事项 1.与字符串的支付无关 2.如果定义长度小于当前字符串长度,则不发生变化 阅读全文
posted @ 2022-11-23 20:39 bobo2404 阅读(24) 评论(0) 推荐(0) 编辑
 
摘要: 功能:将字符串中大小写字母进行转换 newstr = string.swapcase() 注意事项:只对字符串中的字母有效 阅读全文
posted @ 2022-11-23 20:20 bobo2404 阅读(16) 评论(0) 推荐(0) 编辑
 
摘要: 字符串全部转换成大写 用法 big_str = string.upper() upper的注意事项 1.只对字符串中的字母有效 2.已经是大写,则无效 阅读全文
posted @ 2022-11-23 20:10 bobo2404 阅读(34) 评论(0) 推荐(0) 编辑