Erle Robotics Learning Python GitBook Free

Boolean variables

A boolean is like a light switch. It can only have two values. Just like a light switch can only be on or off, a boolean can only be True or False.

You can use variables to store booleans like this:

a = True

b = False