Concatenation of list of variables
Suppose I have three variables x,y,z
. For pratical reasons, I want to define :
varx = var('x y')
varl = var('z')
A problem arrise immediately
type(varx)
returns <class 'tuple'>
when
type(varl)
returns <class 'sage.symbolic.expression.Expression'>
. As they are not of the same (i can understand why but it seems a little weird) type, it's not possible to concatenate them. What is strange is that
[varl]
is a list, but
list(varl)
is not because varl
is not enumerable. Finally,
list(varx)+[varl]
do what I was expecting (concatenation), but it was after a long time of essais and error. Could some one explain the logic behind this ?