I tried the following code in python but it gives error of list index out of range. Can anyone help
def mini2(x): n=0 min1=x[n] if min1>x[n+1]: