if end1 <= val <= end2 or end2 <= val <= end1:
return True
else:
return False
等于
return end1 <= val <= end2 or end2 <= val <= end1
if end1 <= val <= end2 or end2 <= val <= end1:
return True
else:
return False
等于
return end1 <= val <= end2 or end2 <= val <= end1
转载于:https://www.cnblogs.com/yaos/p/7066941.html