Parameters: PY, a = 1 # this value can be changed MZN, int:a = 1; # this value is fixed Variables: PY, a = 1 (implicit, 'a' can be either a var or parameter) MZN, var int:a; % this value can be changed ====== Array It is a collection of data, each data is characterized by an index and a value. By default, the index is a sequence of consecutive integers. Such sequence starts from 0 in Python; starts from 1 in MZN. In python, an array (usually called as list) can contain any kinds of data. In contrast, the data type of MZN array must be homogeneous, and it should be declared a priori. You need to say, it is an array of parameters or variables; it is an array of integers or string. PY, A = [] # In Python you can declare empty list (array); A = [1,5] # or a list with instantiated values MZN, array[1..2] of int:A; % an array of parameters (whose values will be instantiated and fixed) array[1..2] of var int:A % an array of variables % it is meaningless to declare empty array in mzn, % in CP (declarative language), when you use something, you must describe % what it is (e.g. the index range, the type of elements it contain) ======= Sum a fraction of an array: PY, theSum = sum(A[1:3]) # from the second to the third element (included) MZN, var int : theSum = sum(i in 1..3)(A[i]) % from the first to the third element (included)