Could not find the answer in Google. Question, type constructs (x is an integer)
if x > 14: do something and
if x >= 15: do something will have the same lead time?
Could not find the answer in Google. Question, type constructs (x is an integer)
if x > 14: do something and
if x >= 15: do something will have the same lead time?
And why would he be different?
In [3]: import dis In [4]: dis.dis('if x > 14: pass') 1 0 LOAD_NAME 0 (x) 2 LOAD_CONST 0 (14) 4 COMPARE_OP 4 (>) 6 POP_JUMP_IF_FALSE 8 >> 8 LOAD_CONST 1 (None) 10 RETURN_VALUE In [5]: dis.dis('if x >= 14: pass') 1 0 LOAD_NAME 0 (x) 2 LOAD_CONST 0 (14) 4 COMPARE_OP 5 (>=) 6 POP_JUMP_IF_FALSE 8 >> 8 LOAD_CONST 1 (None) 10 RETURN_VALUE Source: https://ru.stackoverflow.com/questions/880434/
All Articles