Is there a way to get an alias for a part of a list in python?
Specifically, I want the equivalent of this to happen:
>>> l=[1,2,3,4,5]
>>> a=l
>>> l[0]=10
>>> a
[10, 2, 3, 4, 5]
But what I get is this:
>>> l=[1,2,3,4,5]
>>> a=l[0:2]
>>> l[0]=10
>>> a
[1, 2]