Python Find Peaks And Valleys