What if I have two lists for both minimum and maximum values Minimum Maximum 0 10 11 20 21 30 31 40 Now how should I check if actual result is not laying between above ranges if not minimum<=actual_result and not maximum>=actual_result: Any suggestions?