intent: Python split a list into subsets based on pattern
rewritten_intent: split list `mylist` into a list of lists whose elements have the same first five characters
snippet: [list(v) for k, v in itertools.groupby(mylist, key=lambda x: x[:5])]