if a i value is inforior to 10 or superior to 5 in python

You can use an if statement with conditional operators to check if a value is greater than 5 or less than 10 in Python.

main.py
i = 7

if i < 10 and i > 5:
    print("i is between 5 and 10")
else:
    print("i is not between 5 and 10")
108 chars
7 lines

The above code checks if i is greater than 5 and less than 10 using the and operator. If this condition is true, it prints "i is between 5 and 10". If the condition is false, it prints "i is not between 5 and 10".

gistlibby LogSnag