First time here? Check out the FAQ!
answered 2021-12-15 16:33:03 +0100
You can use list of lists:
z=[ [var(f'p_{k}{l}') for l in range(4)] for k in range(2)]
and access its elements like z[1][3].
z[1][3]