Interview Q&A / Python
Python interview questions
Lists, dictionaries, generators, decorators and the Python questions asked in service-company and data roles.
Prefer rapid revision? Practise Python short interview answers →
- What does yield from do in Python?
yield from iterable hands over each item of another iterable or generator to the caller, as if you had written a for loop with yield. It also passes through values sent into the generator and returns the sub-generator's return value.
AdvancedQuick answer1 min read