Python运算符
运算符用于对值进行计算或判断。
常见类型:
- 算术运算符:
+,-,*,/,//,%,** - 比较运算符:
==,!=,>,<,>=,<= - 逻辑运算符:
and,or,not - 成员运算符:
in,not in - 身份运算符:
is,is not
运算符常和Python条件判断、Python循环语句配合使用。
运算符用于对值进行计算或判断。
常见类型:
+, -, *, /, //, %, **==, !=, >, <, >=, <=and, or, notin, not inis, is not运算符常和Python条件判断、Python循环语句配合使用。