一、python简介
1.1、变量
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'
4)不要和python内置的东西重复
5)最好见名知意,单词一直可以下划线分割,如user_id
1.2、基本语句
1)条件语句
#if基本语句 if 条件: 内部代码块1 else: 内部代码块2 print('....')