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
标签:href over html ons pyc ack text iso ssi
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
This inspection highlights chained comparisons that can be simplified.
标签:href over html ons pyc ack text iso ssi
原文地址:http://www.cnblogs.com/antflow/p/7530605.html