摘要: 优先级排序(具体的我也不太懂) def sort_priority(values,group): def helper(x): if x in group: print('在group',0,x) return (0,x) # print(values) print('不在group',1,x) r 阅读全文
posted @ 2021-04-21 14:21 ty1539 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 测试1: age = 19 def func1(): age = 73 def func2(): nonlocal age # global age # age = 11 print('func2 内',age) func2() print('func1 内',age) func1() print( 阅读全文
posted @ 2021-04-21 11:45 ty1539 阅读(45) 评论(0) 推荐(0) 编辑