updated traffic lights in python, so that it is cleaned up for the magazine