Run
x = 4 if x in range(1, 8): print('x is in the given range.') else: print('x is not in the given range.')
Output