In [1]:
import cplex

In [2]:
c = cplex.Cplex()

In [3]:
var_names = ['x1', 'x2', 'x3'] # variable names
lb = [-4, -1, -3]              # lower bounds
ub = [ 2,  3,  4]              # upper bounds
var_types = ['C', 'C', 'C']    # variables types

In [4]:
indices = c.variables.add(names = var_names,
                          lb = lb,
                          ub = ub,
                          types = var_types)
indices


Out[4]:
range(0, 3)