Hill Climbing Problem In Python