How to display variable value

Dear All,
I have a very beginner question. How to display all variables in an optimization model? For example, with this simple code, I want to display x1, x2, x3, and obj.

!pip install gamspy
!gamspy install license 5879d20c-aaa7-4cdf-9c92-c005b04a614f
import gamspy as gpy
from gamspy import Container,Variable,Sense

#Model
m = Container()

#definikan variabel-variabel
x1 = Variable(m, name=“x1”)
x2 = Variable(m, name=“x2”)
x3 = Variable(m, name=“x3”)

#definikan fungsi-fungsi kendala
con01 = gpy.Equation(m, name=“con01”, definition=x1 + 2*x2 >= 3)
con02 = gpy.Equation(m, name=“con02”, definition=x3 + x2 >= 5)
con03 = gpy.Equation(m, name=“con03”, definition=x1 + x3 == 4)

#Definiskan fungsi objektif
obj = x1 + 3x2 + 3x3

#Solve
LP = Model(m,
name=“LP”,
equations=[con01,con02,con03],
sense=Sense.MIN,
objective=obj)
LP.solve()

Thank you very much.

You can simply print them:

print(x1.records)
print(x2.records)
print(x3.records)
print(LP.objective_value) # since obj is not a variable but an objective expression.

Alternatively, you can iterate over all variables in the container:

for variable in container.getVariables():
    print(variable.records)

Thank you very much.