python中的函数用法入门教程

2019-10-05 20:17:44于丽

说是没有定义全局name 'x'  

>>> x =10 
>>> def t(n): 
...    print x*n 
>>> m = t(2) 
20 

希望本文所述对大家的Python程序设计有所帮助