Python Programming - Generators - Discussion

Discussion Forum : Generators - General Questions (Q.No. 35)
35.
What does the itertools.permutations() function do when used with a generator?
It generates all possible permutations of the elements in the generator
It returns a single permutation of the elements
It stops the generator after one iteration
It shuffles the values produced by the generator
Answer: Option
Explanation:
itertools.permutations() generates all possible permutations of the elements in the generator.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.