Solutions to python challenge