For example I have a non-ordered list of values [10, 20, 50, 200, 100, 300, 250, 150]
I have this code which returns the next greater value:
def GetN
Let the unordered list be myList:
myList
answer = max(x for x in myList if x < temp)