Cook was educated at Radley College and then went up to Pembroke College, Cambridge, where he read French and German. As a student, Cook initially intended to become a career diplomat like his father, but Britain "had run out of colonies", as he put it. Although largely apathetic politically, particularly in later life when he displayed a deep distrust of politicians of all hues, he joined the Cambridge University Liberal Club. At Pembroke, Cook performed and wrote comedy sketches as a member of the Cambridge Footlights Club, of which he became president in 1960. His hero was fellow Footlights writer and Cambridge magazine writer David Nobbs.