Here is my list,
a = [['a','b','c','d'],['e','f','g','h'],['i','j','k','l'],['m','n','o','p']]
and Here is my function,
def add(change,unchange):
a = change
b = unchange
a[0].insert(a[0].index(a[0][2]),"high_range")
a[0].insert(a[0].index(a[0][3]),"low_range")
print(a)
print(b)
When I try to execute this function,
add(a,a[0])
I'm getting this output,
[['a', 'b', 'high_range', 'low_range', 'c', 'd'], ['e', 'f', 'g', 'h'], ['i', 'j', 'k', 'l'], ['m', 'n', 'o', 'p']]
['a', 'b', 'high_range', 'low_range', 'c', 'd']
But my expected output is the following,
[['a', 'b', 'high_range', 'low_range', 'c', 'd'], ['e', 'f', 'g', 'h'], ['i', 'j', 'k', 'l'], ['m', 'n', 'o', 'p']]
['a', 'b', 'c', 'd']
How to make the first element of the list keep on same in the second variable ? Sorry I'm newbie.