Home of real teaching & learning
  • Full support for teachers
  • Focus on critical thinking
  • Engaging classroom activities
  • Integrated student eBook
  • Assessed tasks / qBank
  • Practice exam questions

The InThinking Guarantee: Our sites are written by expert practitioners and not by AI

See our AI policy

Disclaimer: InThinking subject sites are neither endorsed by nor connected with the International Baccalaureate Organisation.

Don't miss out, find out!

Reading and writing files in Python

Most IA products need to keep their data somewhere. A program holds its data in memory while it runs, but memory is emptied the moment the program closes. To keep data between runs, or to take data in from the client and hand results back out, you write it to a file and read it in again. This tutorial saves the same small set of students to three kinds of file, then reads each one back. The three formats are plain...

Help