import ast def process(node): for node in node.nodes: ast.execute(node)