Why aren\'t the variables below (A,B,C,D) changed when tst is called.
A,B,C = 0,0,0 D = 0 def tst(): A,B,C = 1,2,3 D = 4 print(A,B,C,D) ts
because of Python scoping rules.
in def tst(), you're creating local variables A, B, and C, and assigning them new values.
if you wish to assign to the global A,B, and C values, use the global keyword.