if condition for bool in python code example Example: check if boolean is true python b = True if b: print('b is True') else: print('b is False')