Port of Chris Applegate's Javascript Daily Mail headline generator, to Python