Constructing another matrix consisting of distinct values
for i in range ( N ) : NEW_LINE INDENT new = [ ] NEW_LINE for j in range ( M ) : NEW_LINE INDENT new . append ( c ) NEW_LINE c = c + 1 NEW_LINE DEDENT B . append ( new ) NEW_LINE DEDENT