Documentation

LinExpr.getVar()


LinExpr.getVar()

getVar ( i )

Retrieve the variable object from a single term of the expression.

Return value:

Variable for the term at index i in the expression.

Example usage:

  e = x + 2 * y + 3
  print(e.getVar(1))