零基础学python-18.1 函数的设计
摘要:
这一章节我们来讨论一下函数的设计的一些习惯:1.耦合性:输入使用参数,输出使用return推荐方式:>>> def test(x): print(x) return x+1>>> a=1>>> test(a)12>>> 反面教程:>>> a=1>>> def test(): global a a=a... 阅读全文
posted @ 2015-09-17 10:54
李灵晖
阅读(130)
评论(0)
推荐(0)
浙公网安备 33010602011771号