Python Language Part-2
Flow Control Boolean Values:- While the integer, floating-point, and string data types have an unlimited number of possible values, the Boolean data type has only two values: True and False. (Boolean is capitalized because the data type is named after mathematician George Boole.) When typed as Python code, the Boolean values True and False lack the quotes you place around strings, and they always start with a capital T or F, with the rest of the word in lowercase. Enter the following into the interactive shell. (Some of these instructions are intentionally incorrect, and they’ll cause error messages to appear). >>> spam = True >>> spam True >>> true Traceback (most recent call last): File " ", line 1, in true NameError: name 'true' is not defined w >>> True = 2 + 2 SyntaxError: assignment to keyword Comparison Operators Comparison operators compare two values and evaluate down to a single Boolean value. == Equal to !=