作用:

定义:
命名规范:
只能由字母、下划线和数字组成,且数字不能开头
python中的标识符是区分大小写的
变量名不能加引号
定义:Python语言中已经占用的具有特殊含义的符号(事先霸占好了)
查看关键字的方法
使用help("keywords")
In [2]: help("keywords")
Here is a list of the Python keywords.  Enter any keyword to get more help.
False               def                 if                  raise
None                del                 import              return
True                elif                in                  try
and                 else                is                  while
as                  except              lambda              with
assert              finally             nonlocal            yield
break               for                 not                
class               from                or                  
continue            global              pass                
不能和关键字及已有的名字冲突
命名方法:
大驼峰
XiaoMing 小驼峰
xiaoMing 下划线分隔法
xiao_ming
                分享标题:Python基础讲解:变量
                
                文章起源:http://www.csdahua.cn/qtweb/news2/319152.html
            
网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网