The SequenceIterator class of Section 2.3.4 provides what is known as a forward iterator. Implement a class named ReversedSequenceIterator that serves as a reverse iterator for any Python sequence...

The SequenceIterator class of Section 2.3.4 provides what is known as a



forward iterator. Implement a class named ReversedSequenceIterator that


serves as a reverse iterator for any Python sequence type. The first call to


next should return the last element of the sequence, the second call to next


should return the second-to-last element, and so forth.




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here