def test(inArr):
    arr = inArr[:]
result = []
while len(arr) > 1:
    x = [arr[0], arr[1]]
arr = arr[2:]
step = x[1] - x[0]
while len(arr) > 0 and x[1] + step == arr[0]:
    x[1] += step
arr = arr[1:]
result.append((x[0], x[1], step))
if len(arr) == 1:
    result.append(arr[0])
return result
print(test([2, 4, 6, 8, 12, 13, 14, 15, 16, 17, 20]))
Identify groups of varying continuous numbers in a list