I have a list of elements, for example:
myList={5, 12, 16, 18, 19, 24, 28, 29, 31, 32, 35, 42, 43, 47, 50, 53, 60, 61, 62, 64, 79, 82, 84, 92, 105, 128, 136, 153, 154, 155, 156, 158, 159, 160, 164}
I wish to create sublists based on consecutive elements and drop sublists that have a length of 1:
{{18,19},{28,29},{31,32},{42,43},{60,61,62},{153,154,155,156},{158,159,160}}
I can't work out a simple method to do this, but thought there must be a way with Differences, SplitBy, Partition, Cases, etc. or am I missing something obvious?
Thank you in advance!
You want
– Quantum_Oli Feb 02 '16 at 21:04Split