Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 92)
92.
How does the
itertools.dropwhile()
function differ from itertools.takewhile()
when used with generators?
Answer: Option
Explanation:
itertools.dropwhile()
skips elements until a specified condition becomes false, while itertools.takewhile()
yields elements as long as the condition is true.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers