Refactor to a list comprehension for clarity.
Consolidate the two head teacher queries.
Whitespace and formatting.