Ask Your Question

Revision history [back]

You sould double the braces as follows:

v = {(i,j): var("v_{}{}".format(i, j), latex_name="v_{{{}{}}}".format(i, j)) for i in range(2) for j in range(2)}

You sould use double the braces as follows:

v = {(i,j): var("v_{}{}".format(i, j), latex_name="v_{{{}{}}}".format(i, j)) for i in range(2) for j in range(2)}