Is there a way to create a “slice view” of a sequence in Python 3 that behaves like a regular slice but does not create a copy of the sliced portion of the sequence? When the original sequence is updated, the “slice view” should reflect the update.
>>> l = list(range(100)) >>> s = Slice(l, 1, 50, 3)
I can write my own Slice class that does this, but I wanted to find out if there is a built-in way.
source share