Python2 和 Python3 中的关键字

来源:互联网 发布:桌面字体软件 编辑:程序博客网 时间:2024/05/20 19:18

         Python2中共有31个关键字:

         and              del                from                not                 while

         as                elif                global             or                   with

         assert         else              if                      pass              yield

         break          except         import             print

         class           exec            in                     raise

         continue      finally          is                     return

         def               for               lambda           try

         

         Python3中,exec 不再是关键字,但nonlocal是一个新的关键字。


0 0
原创粉丝点击