Python note.4分支、循环、条件、枚举

第六章 分支、循环、条件与枚举

什么是表达式

C语言的定义: 表达式(Expression)是运算符(operator)和操作数(operand)所构成的序列

a = 1
b = 2
c = 3
a or b and c
1
c = int('1') + 2
print c
3
1 or 2
1
1 and 3
3
a or b and c#与下面下同
a or (b and c)
c = a + b#右结合,从=的右边开始
a = 1
b = 2
c = 2
not a or b + 2 == c
False
#上题计算顺序为
(not a) or ((b + 2) == c)
not>and>or#优先级

如何在文件里写代码txt,idle是命令行不是文件

IDE(Integrated Development Environment)
pycharm vscode sublime

ctrl+~可以调出vscode 的命令行,再次按 可以关闭

猜你喜欢

转载自www.cnblogs.com/wuyifan/p/11469884.html