var a = "Test"; var my_list = [1, a, 2]; print(my_list); # expect: [1, Test, 2] a = 5; print(my_list); # expect: [1, Test, 2] class Foo { __init__() { this.x = 1; } } a = Foo(); my_list[1] = a; print(my_list); # expect: [1, , 2] print(a.x); # expect: 1 my_list[1].x = 2; print(a.x); # expect: 2