True or False
True is used for checking if a feature is on or if data is available. We store in a variable just like a string or a number and displaying works same way.
Example 1:
turned_on = True print(turned_on)
Output: True
False is another special value and the opposite of True
Example 2
print (“Load data”) status = False print (status)
Output:
Load data False
Negating Values
Negating Values is the not in front of True make the expression result False. If something is not true it ahs to be false. not is the negating operator. It turns the value into their opposite. The not operator before False changes its value. If a value not False, it has to be True, then we displaying not False. We can also use the not operator with variables to negate their values. By displaying not available here, we’ll see its negated value.
available = True print (not available)
Output: False
We can save a whole negating in other variable, too.like her is_evening should store the value of not morning.
morning =True is_evening = not morning print (is_evening)
Output: False