I simplified my code to get the error I required.
one = ['x']
two = ['y']
final_data = []
for r in range(1, 3):
print(final_data, r)
if r == 2:
one[0] = two[0]
print(one)
final_data.append(one)
print(final_data)
print(final_data)
The final data in 2nd loop is not modified but the end result is coming [['y'], ['y']]
even though
I expect it to come as [['x'], ['y']]