def symbol_gen(sym_str):
    n = 0
    while True:
        yield Symbol("%s_%d" % (sym_str, n))
        n += 1
Symbol generator
dataset/ETHPy150Open sympy/sympy/examples/intermediate/vandermonde.py/symbol_gen