Python Day 35 – you can not a boolean??

Today my Udemy course went more in depth with “and” and “or” inside if statements. I learned that one can use greater than (>) or less than (<) signs to determine whether a line prints, and that you can combine multiple of these together.

I also learned that you can put “not” in front of a boolean and it’ll treat the boolean as the opposite of what it actually is! For instance:

raining = False

if not raining:
print(“it’s not raining”)
else:
print(“it’s raining”)

Neat stuff!

Leave a Reply

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading