标签:hung logs try int 下划线 oba 定义 print 字段
用来存东西的,方便后面调用
name = "Hiuhung Wan"
变量名 = 值,一个等号是赋值号,右边的值赋值给左边
1.变量再赋值给变量
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author:Hiuhung Wan name = "Hiuhung Wan" name2 = name print("My name is",name,name2)
其中的name的值改变后,name2的值是不会变的
1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 # Author:Hiuhung Wan 4 name = "Hiuhung Wan" 5 name2 = name 6 print("My name is",name,name2) 7 name = "Zhang Binbin" 8 print(name,name2)
[‘and‘,‘as‘,‘assert‘,‘break‘,‘class‘,‘continue‘,‘def‘,‘del‘,‘elif‘,‘else‘,‘except‘,‘exec‘,‘finally‘,‘for‘,
‘from‘,‘global‘,‘if‘,‘import‘,‘in‘,‘is‘,‘lambda‘,‘not‘,‘or‘,‘pass‘,‘print‘,‘raise‘,‘return‘,‘try‘,‘while‘,
‘with‘,‘yield‘]
标签:hung logs try int 下划线 oba 定义 print 字段
原文地址:http://www.cnblogs.com/hiuhungwan/p/7670230.html