My take on the python challenge