Python case study 2