Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Using True and False in variables

x = True
y = False


if x:
    print("X is True")
else:
    print("X is False")


if y:
    print("Y is True")
else:
    print("Y is False")


# X is True
# Y is False