# 变量 # 赋值语句 spam = 20 eggs = 2 print(spam + eggs) spam = spam + 2 print(spam) # 变量命名规范 # 1、只能是一个词 # 2、只能包含字母、数字和下划线(_)字符 # 3、不能以数字开头
有效的变量名: curent_aaa 、currentAAA 、account4、_42、Total_s、hello
无效的变量名:current-aaa 、current AAA、4account、42、Total_$s、'hello'