Python Programming - Generators - Discussion

Discussion Forum : Generators - General Questions (Q.No. 70)
70.
What is the purpose of the itertools.starmap() function when used with generators?
It applies a function to pairs of elements from multiple generators
It filters elements based on a specified condition
It stops the generator after one iteration
It applies a function to elements from a single generator
Answer: Option
Explanation:
itertools.starmap() applies a function to elements from a single generator, using argument unpacking to provide the function with multiple arguments.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.