So basically I have two lists a
and b
and have defined them like a=b=[10]
so changing one will change the other-
a=b=[10]
a[0]+=1
a
>>>[11]
b
>>>[11]
Is there a way to do this but instead make it give double of the variable? Desired output -
a=b=[10]
#some code
a
>>>[10]
b
>>>[20]