Your problem is that in your initialization of variables, variables[0] become 0, the value of x. And then you are over-writing that value with a new value.
The following code outputs 0, not 1.
#!/usr/bin/python
#
# Description: trying to evaluate array -value to variable before assignment
# but it overwrites the variable
#
# How can I evaluate before assigning on the line 16?
#Initialization, dummy code?
x=0
y=0
variables = [x, y]
data = ['2,3,4', '5,5,6']
x = 1
variables[0] = data[0]
print(variables[0]);
You can get the desired result by wrapping x in an array and dereferencing.
#!/usr/bin/python
#
# Description: trying to evaluate array -value to variable before assignment
# but it overwrites the variable
#
# How can I evaluate before assigning on the line 16?
#Initialization, dummy code?
x=[0]
y=[0]
variables = [x, y]
data = ['2,3,4', '5,5,6']
# variables[0] should be evaluted to `x` here, i.e. x = data[0], how?
variables[0][0] = data[0]
if ( variables[0][0] != x[0] ):
print("It does not work, why?");
else:
print("It works!");