def isIncreasing(seq):
flag = True
for i in range(len(seq) - 1):
if seq[i + 1] < seq [i]:
flag = False
return flag
a = [1, 2, 3, 4, 5] # print True
b = [2, 3, 1, 5, 4] # print False
I have two sequence. Is there any better way to modify my function if the sequence is incrementing?