LinExpr.getConstant()

getConstant ( )

Retrieve the constant term from a linear expression.

Return value:

Constant from expression.

Example usage:

  e = 2 * x + 3
  print(e.getConstant())