DEV Community

Discussion on: Charming the Python: Boolean & Operators

 
vickilanger profile image
Vicki Langer • Edited

So, part of my problem understanding your original post was that I had never seen assert before. I've read up on it and now I think I can make sense of this.

If I'm now understanding correctly, and & or statements seem similar to if, else, and elif statements.

I'm thinking something like this is a simple enough example.

dog_hungry = False
is_dinner_time = True

if dog_hungry or is_dinner_time:
    print("Feed dog")