摘要: 函数 def sayHi(): print 'Hi' def cheng(a,b): return a*b print cheng(3,4) 局部变量:函数内部定义,函数调用结束后释放 全局变量:函数内外都可调用,global >>> def hanshu2():... global x #x为全局 阅读全文
posted @ 2016-05-15 00:40 麦穗儿 阅读(189) 评论(0) 推荐(0) 编辑