Python code examples. Largely taken from the lessons on Codecademy.