def longestPeak1(array): longest = 0 i = 1 while i < len(array) - 1: if not array[i - 1] < array[i] and not array[i] > array[i + 1]: