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