Python Booleans

Agenda of this session

Python Booleans

Python Booleans

Introduction to Python Boolean data type :
In programming, you often want to check if a condition is true or not and perform some actions based on the result. To represent true and false, Python provides you with the boolean data type. The boolean value has a technical name as bool. The Boolean data type has two values: True and False. Note that the Boolean values True and False start with the capital letters (T) and (F).

    Summary
  • Python boolean data type has two values: True and False.
  • Use the bool() function to test if a value is True or False.
  • The falsy values evaluate to False while the truthy values evaluate to True.
  • Falsy values are the number zero, an empty string, False, None, an empty list, an empty tuple, and an empty dictionary. Truthy values are the values that are not falsy.



We have our own LMS. SMARTLEARN is cloud based user-friendly Learning Management System. You will get 24 X 7 hours access by login with a unique username and password. The full course content has been uploaded in the LMS. Please Register with us. After registration you will get the login details.  Register Now