I have a list:
a = [2, 3, 5, 6, 6, 7, 10, 11, 13, 14, 15, 16, 16, 17, 18, 20, 21]
Is it possible to make a function that shows the longest list of distinct, consecutive elements?
Please, show how to do it
In this case the answer should be:
13, 14, 15, 16, 17, 18