标签:
1。import math ,无分号结尾,
函数定义:
x= 1
def change():
x= 10;
print x;
print x
显示1;
x= 1
def change():
globle x ;
x= 10;
print x;
print x
显示10;
对象定义
class MyClass:
def __ini__(self):
self.name = "orange"
def setName(name):
self.name = name
x = MyClass
print x.name
标签:
原文地址:http://www.cnblogs.com/panjun/p/4779872.html