Python中的变量命名规范:小写字母,多个单词之间用下划线'_'隔开,不能以数字开头。
创见一文件Chaper3-1.py:
name = "唐僧"print(name)name = "八戒"print(name)name = "猴哥"print(name)name = 28print(name)name = 1.0print(name)
运行结果:
唐僧八戒猴哥281.0
本文共 238 字,大约阅读时间需要 1 分钟。
Python中的变量命名规范:小写字母,多个单词之间用下划线'_'隔开,不能以数字开头。
创见一文件Chaper3-1.py:
name = "唐僧"print(name)name = "八戒"print(name)name = "猴哥"print(name)name = 28print(name)name = 1.0print(name)
运行结果:
唐僧八戒猴哥281.0
转载于:https://my.oschina.net/yuerliang/blog/885526