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 (
TrueandFalse)operators
comparison operators (
==,!=,>,<,>=,<=)logical operators (
and,or,not)membership operators (
in,not in)
if,elif, andelsestatementslists
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
forloops andwhileloopsrange()functionbreakandcontinueandpassstatementsmore Python basic operators
%modulus+=, -=, *=, /=