Learn about Python Conditions

You are here: Home » Blog » Computer Programming Languages » Python » Learn about Python Conditions

Learn about Python Conditions

Python uses Boolean variables to evaluate conditions. The Boolean values True and False are returned when an expression is compared or evaluated. For example:

x = 2
print(x == 2) # prints out True
print(x == 3) # prints out False
print(x < 3) # prints out True

Trinket.io on-line Python compiler

Notice that variable assignment is done using a single equals operator “=“, whereas comparison between two variables is done using the double equals operator “==“. The “not equals” operator is marked as “!=“.

By |2019-03-28T18:52:31-04:00April 7th, 2018|Categories: Computer Programming Languages, Python|Tags: , |

About the Author:

I am a loving father, & husband. I am a computer enthusiast. I have used and enjoyed computers since I was young and I enjoy teaching young minds how to code, because it teaches them how to think. Today with YouTube, and social media garbage our youth are losing the ability to think on their own and solve problems. I believe this is a serious epidemic as kids today dont understand that technology is a tool. This tool is being abused, and its underlying effects are taking its toll on kids behaviour, and learning.