2 ms·
> Slicing in Python always create a new object. It always creates a new object but it doesn't necessarily copy the contents (even shallowly). For instance sli
by masklinn 6y ago
> Slicing in Python always create a new object.
It always creates a new object but it doesn't necessarily copy the contents (even shallowly).
For instance slicing a `memoryview` creates a subview which shares storage with its parent.