1. Home
  2. Data Science
  3. Python
  4. What does yield from do in Python?

Added 25 Nov 2026

What does yield from do in Python?

  1. Ends a generator
  2. Delegates to another iterable or generator Correct answer
  3. Raises StopIteration
  4. Creates a thread

Correct answer

B. Delegates to another iterable or generator

7 views

MCQSEXAM

Explanation

yield from yields all values from a sub-iterator.

Reference

Asked in: Python Interview Advanced

https://docs.python.org/3/library/index.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs