Python Programming - Standard Libraries - Discussion

Discussion Forum : Standard Libraries - General Questions (Q.No. 18)
18.
What does the itertools.cycle() function do?
Creates an infinite iterator from a finite iterable
Generates all possible permutations of an iterable
Repeats an iterable indefinitely
Filters elements based on a predicate function
Answer: Option
Explanation:
The itertools.cycle() function in Python repeats an iterable indefinitely, cycling through its elements.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.