Practical Python

Fundamentals

Assignment

Naming rules

Expressions

print

if and truth testing

if tests

truth tests

while and for

while loops

break, continue, pass, else

for loops

functions

Why use functions?

functions

Example function: intersecting sequences

Scope rules for functions

Passing arguments to functions

Optional arguments

Modules

Why use modules?

Modules

Built-in functions and convenient modules

Data converters

string module

re module

os module

timing and profiling

Running Python scripts

Hello, World!

Hello, Name