So I have a list with a pattern. For example. Items of the same kind in order.
mylist = [itemtype1, itemtype1, itemtype1, itemtype2, itemtype2, itemtype2, itemtype3, itemtype3, itemtype3]
myresultlist = [[itemtype1, itemtype2, itemtype3], [itemtype1, itemtype2, itemtype3], [itemtype1, itemtype2, itemtype3]]
Actually, I want to create sub-lists of the unique items.
[itemtype1, itemtype2, itemtype3], [itemtype1, itemtype2, itemtype3], [itemtype1, itemtype2, itemtype3]
Is it possible to create "myresultlist" from "mylist".
Edit: Another example.
mylist = ['jimmy', 'andrew', 'kappy', 'US', 'Spain', 'UK', 'Baseball', 'Football', 'Cricket']
myresultlist = [['jimmy', 'US', 'Baseball'], ['andrew', 'Spain', 'Football'], ['kappy', 'UK', 'Cricket']