Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythonitertoolsSingle-choice MCQ

After building a list of (key, group) pairs from itertools.groupby and then iterating it, what does this print?

import itertools groups = itertools.groupby('AAAB') saved = [(k, g) for k, g in groups] print([(k, list(g)) for k, g in saved])