Categorize list in Python,"list([x for x in totalist if x[:2] == ['A', 'B']])"