I have an integer value x
, and I need to check if it is between a start
and end
values, so I write the following statements:
if x >= start and x <= end:
# do stuff
This statement gets underlined, and the tooltip tells me that I must
simplify chained comparison
As far as I can tell, that comparison is about as simple as they come. What have I missed here?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…