Python basics

Introduction, and installing python for healthcare modelling (YouTube)


Nested Lists




Sorting and sub-grouping dictionary items with itemgetter and groupby


math module

Variable Types

Random numbers and sequences

if, else, elif, while, and logical operators; else after while

loops and iterating

List comprehensions – one line loops (more examples here).

try …. except (where code might fail)

Decimal places in output

Read from and write to files


Automatically passing unpacked lists or tuples to a function (or why do you see * before lists and tuples)

Lambda functions (one line functions), and map/filter/reduce

Accessing date and time, and timing code

Brief examples of applying lambda functions to lists, and filtering lists with list comprehensions, map and filter

Saving python objects to disk with pickle