Python中运算符优先级问题

赋值运算符<逻辑运算符<关系运算符<算数运算符

算数运算符:+    -     *     /      %    **    //

逻辑运算符: and(逻辑与)    or (逻辑或)   not (逻辑非)

关系运算符:  <   <=   >   >=   != 

赋值运算符:=  %=  /=  //=  -=  +=  *=  **=

 

猜你喜欢

转载自www.cnblogs.com/song-mu666/p/10249316.html