Python check if the integer number in the range code example
Example 1: python check if number is in range
if 10000 <= number <= 30000:
pass
Example 2: Write a Python function to check whether a number is in a given range.
def test_range(n):
if n in range(3,9):
print( " %s is in the range"%str(n))
else :
print("The number is outside the given range.")
test_range(5)