摘要: 程序目录结构1: package目录: 程序入口文件main.py from package.view import View from package.operation import Operation class Main(): @staticmethod def run(): if View 阅读全文
posted @ 2022-01-19 17:15 urls 阅读(50) 评论(0) 推荐(0) 编辑
摘要: # ### 字符串的相关函数 # *capitalize 字符串首字母大写 strvar = "how are you" res = strvar.capitalize() print(res) # *title 每个单词的首字母大写 strvar = "how old are you" res = 阅读全文
posted @ 2022-01-19 17:02 urls 阅读(42) 评论(0) 推荐(0) 编辑
摘要: dic = {} # 增 # 1.普通方法 (推荐) dic["top"] = "369" dic["middle"] = "左手" dic["bottom"] = "杰克爱" print(dic) # {'top': '369', 'middle': '左手', 'bottom': '杰克爱'} 阅读全文
posted @ 2022-01-19 15:43 urls 阅读(27) 评论(0) 推荐(0) 编辑
摘要: # max 获取一个序列里边的最大值 # min 获取一个序列里边的最小值 lst = (-100,1,2,3,4,34) res = max(lst) res = min(lst) print(res) # max / min 的高阶函数的使用方式 tup = ( ("赵云",100) , ("赵 阅读全文
posted @ 2022-01-19 14:11 urls 阅读(267) 评论(0) 推荐(0) 编辑