摘要: name = 'ALLix9' print(name.casefold()) # 大写变成小写 name.lower() # 全变小写 name.upper() # 大写 name.title() # 首字母大写 print('10'.isnumeric()) #判断是否是数字:正整数 print( 阅读全文
posted @ 2019-10-13 21:42 wztshine 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 转自 菜鸟教程:https://www.runoob.com/python/att-string-format.html Python format 格式化函数 Python2.6 开始,新增了一种格式化字符串的函数 str.format(),它增强了字符串格式化的功能。 基本语法是通过 {} 和 阅读全文
posted @ 2019-10-13 19:57 wztshine 阅读(723) 评论(0) 推荐(0) 编辑