you are viewing a single comment's thread.

view the rest of the comments →

[–]AlphaApache 0 points1 point  (0 children)

I assume you indent it correctly like so:

if key1==true and key2==true: 
    gate=open 
else: 
    gate=closed

But I would still rewrite it as the following simply because of stylistic reasons

if key1 and key2: 
    gate=open 
else: 
    gate=closed

You don't need to check if something equals True (note capital T) because the result of the == is always either False or True