The abstract syntax tree (AST) is a representation of the structure of the source code of any programming language. Every language, including [[Python]], has a specific AST; Python’s AST is built by parsing a Python source file. Like any tree, this one is made of nodes linked together. A node can represent an operation, a statement, an expression, or even a module. Each node can contain references to other nodes that make up the tree. With [[Emacs Lisp|Elisp]] you get closer to the AST, and can modify it with tools such as [[Lispy]] or [[Paredit]]. This is called [[Structural editing]]. > The `ast.parse()` function parses any string that contains [[Python]] code and returns an `_ast.Module` object. That object is actually the root of the tree: you can browse it to discover every node making up the tree. To visualize what the tree looks like, you can use the `ast.dump()` function, which will return a string representation of the whole tree. \- Serious Python