import pulp from pulp import * members = range(1,27) days = range(1,28) roles = range(1,18) # defining the variables x = pulp.LpVariable.dicts("x",(members,days,roles),0,1,pulp.LpInteger)