Assuming if x in range(y,z) works the way i expect it to work I believe the latter will be more efficient, as for you to possibly check if an item is in an array you have to loop through it(assuming the program doesn’t recognize that the array is defined easily with a mathematical function), so checking for bounds is better as if x >= y and x < z rather than if x in range(y,z)