摘要:
全局与局部变量 在子程序中定义的变量称为局部变量,在程序的一开始定义的变量称为全局变量。 全局变量作用域是整个程序,局部变量作用域是定义该变量的子程序。 当全局变量与局部变量同名时: 在定义局部变量的子程序内,局部变量起作用;在其它地方全局变量起作用。 school = "fosu"#全局变量 de 阅读全文
posted @ 2020-03-17 23:13
七九灰
阅读(281)
评论(0)
推荐(0)
摘要:
面向对象: 类 》class面向过程: 过程 》def函数式编程: 函数 》def #函数 def fun1(): """testing""" print("in the fun1") return 0 #过程 def fun2(): """testing2""" print("in the fun 阅读全文
posted @ 2020-03-17 14:12
七九灰
阅读(262)
评论(0)
推荐(0)

浙公网安备 33010602011771号