>>> from graf_exp import * >>> le = [('a*(b+c)-c/b', 'a*(b+c)'), ('a*(b+c)-c/b', 'c/b'), ... ('a*(b+c)', 'a'), ('a*(b+c)', 'b+c'), ... ('c/b', 'c'), ('c/b', 'b'), ... ('b+c', 'b'), ('b+c', 'c')] >>> g = crea_digraf_exps(le) >>> led = exps_depenen(g, 'b') >>> print (sorted(led)) ['a*(b+c)', 'a*(b+c)-c/b', 'b', 'b+c', 'c/b'] >>> led = exps_depenen(g, 'a') >>> print (sorted(led)) ['a', 'a*(b+c)', 'a*(b+c)-c/b']