What I want to do is to make a simple variable for complex code. For example,
list1 = [['apple','banana'], ['cat', 'dog']]
new = list1[0][1]
new = 'bonono'
print(list1[0][1]) # The result is 'banana', but I hope this to be 'bonono'
I don't want to type list1[0][1]
every time, I just want to type new
for the same value.
If this was C language maybe I can use pointer, but in python I can't find how.
I read about shallow copy or deep copy but it seems it's not about both. So copy.copy()
also didn't work.
Can anyone tell me how?