Intermediate Python
Q66 / 101

What does itertools.chain do?

Correct! Well done.

Incorrect.

The correct answer is A) Combines multiple iterables end-to-end into a single iterator

A

Correct Answer

Combines multiple iterables end-to-end into a single iterator

Explanation

chain([1, 2], [3, 4]) yields 1, 2, 3, 4 without creating a new list. Useful for memory-efficient iteration over multiple sequences.

Progress
66/101