Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 89)
89.
How does the
itertools.islice() function differ from using slice() with a generator?
Answer: Option
Explanation:
itertools.islice() is specifically designed for slicing iterables, including generators. slice() is used for indexing sequences, not for creating a sliced iterable.
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