Continue lines with “"
Put \ at the end of the line, and Python acts as if you are on the same line.
Alphabet = ‘abcde’ + \
‘defgh’
If and else = Python statements
Check whether a condition is True.
Indent 4 spaces. (PEP-8) style
Disaster = True
If disaster:
Print(“Woe”)
Assigned the Boolean value True to variable disaster.
Performed a conditional comparison .
Called the print function.
Comment with “#’
Python ignores everything after the “#”
Called hash, hashtag, sharp , pound, octothorpe.
Comparison operators
Equality - == Inequality - != Less than - Greater than or equal - >= Membership - in
These all return the Boolean value of True or False.