Chapter 2: Control FlowΒΆ
In this chapter you will be introduced to common tools that can be found in many coding languages. These tools will allow you to implement more complex logic in your Python programs. It all has to do with something known as flow of control. Some of the things you will learn about include:
boolean data type (
True
andFalse
)operators
comparison operators (
==
,!=
,>
,<
,>=
,<=
)logical operators (
and
,or
,not
)membership operators (
in
,not in
)
if
,elif
, andelse
statementslists
indexing and slicing
getting length of a list with
len()
appending to a list with
append()
andextend()
methodslist concatenation with
+
operatorintro to mutable and immutable objects
for
loops andwhile
loopsrange()
functionbreak
andcontinue
andpass
statementsmore Python basic operators
%
modulus+=, -=, *=, /=