Control Flow and Loop
Comparison Operator
# Value for all comparison operators listed below is True
10 > 3 # Greater than
10 >=3 # Greater than or equal to
10 < 20 # Less than
10 <= 20 # Less than or equal to
10 == 10 # Equal to
10 != "10" # Not equal to
"bag" > "apple" # When we sort these two strings bag comes after apple thats why true
print(ord("b")) # is 98
print(ord("B")) # is 66Conditional Statements
Ternary Operator
Logical Operator
"and" operator
"or" operator
"not" operator
Short Circuit Evaluation
Chaining Condition Operator
Loops
"range"
"for" Loop
Break Statement
Nested Loop
Iterables
"while" Loop
Infinite Loop
Last updated