fork download
  1. import re
  2. s = "Generic3(p, [Generic3(g, [Atom('_xyx'), Atom('y'), Atom('z_')]), Atom('x_1'), Generic2(f, [Atom('x'), Atom('y')])])"
  3. print(re.findall(r"Atom\('(\w+)", s))
Success #stdin #stdout 0s 23352KB
stdin
Standard input is empty
stdout
['_xyx', 'y', 'z_', 'x_1', 'x', 'y']