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

You can use the logical and operator to check if a value i is both greater than or equal to 5 and less than or equal to 10:

main.py
if i >= 5 and i <= 10:
    # Do something if i is between 5 and 10 (inclusive)
else:
    # Do something else if i is outside of the range
138 chars
5 lines

Alternatively, you can use chained comparison operators to achieve the same result:

main.py
if 5 <= i <= 10:
    # Do something if i is between 5 and 10 (inclusive)
else:
    # Do something else if i is outside of the range
132 chars
5 lines

gistlibby LogSnag