two operands in one line

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mxgangelg

i want to put like

-cash >= 1000 < 10000:
–cash -= 1000

but i dont have idea how do that

:bust_in_silhouette: Reply From: jgodfrey

I’m not sure how to interpret the - characters in your OP, but I think you’re after this:

if cash >= 1000 and cash < 10000: cash -= 1000

… or on 2 lines:

if cash >= 1000 and cash < 10000:
    cash -= 1000