摘要: 1、列表解析、lambda 匿名函数 2、函数默认参数 默认参数为可变类型: 默认参数为不可变类型: def foo(tp1,tp2=()): return tp1+tp2 t1 = foo((1,),(3,4)) print(id(t1),t1) t2 = foo((1,)) print(id(t 阅读全文
posted @ 2017-10-24 15:03 hedeyong11 阅读(224) 评论(0) 推荐(0) 编辑