answered 3 years ago
Why not put the variables in a list?
some_variables = [var(f'p_{k}{l}') for k in range(5) for l in range(4,8)] for v in some_variables: show(LatexExpr(r"\text{blabla } "), v, "\t = \t", "some stuff")