This inspection highlights chained comparisons that can be simplified.

https://stackoverflow.com/questions/26502775/pycharm-simplify-chained-comparison

 

In Python you can "chain" comparison operations which just means they are "and"ed together. In your case, it'd be like this:

if start <= x <= end:

Reference: https://docs.python.org/2/reference/expressions.html#not-in

 

posted on 2017-09-16 11:03  蚂蚁flow  阅读(2219)  评论(0编辑  收藏  举报

导航