second maximum element in an array using python