变量

python也像其他语言一样,有自己的变量。它的变量定义规则如下

1 变量名只能是字母,数字或下划线的任意组合

2变量名的第一个字符不能是数字

3变量名不能是关键字,那么什么是关键字呢?只需要记住他们就好了,不让你用你就不能用!!!

关键字: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 

posted on 2017-12-07 18:45  刘了个岐  阅读(92)  评论(0编辑  收藏  举报

导航