摘要: def test1(): passdef test2(): return 0def test3(): return 0,'hello',['a','b','c'],{'name':'alex'}x=test1()y=test2()z=test3()print('%s\n' %x , '%s \n'% 阅读全文
posted @ 2018-08-03 14:57 只记今朝笑 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 默认值参数def add_end(L=[]): L.append('END') return Lprint(add_end([1, 2, 3]))print(add_end(['x', 'y', 'z']))#上面的两次调用add_end函数没有问题,print(add_end())print(ad 阅读全文
posted @ 2018-08-03 10:06 只记今朝笑 阅读(151) 评论(0) 推荐(0) 编辑