once i tried to implement a code which finds the peak element index in python.
def findPeakElement(nums): l = len(nums) if l > 1: if nums[0] &