Abstract Syntax Trees in Python

In this article Alessandro provides an overview of Abstract Syntax Trees (ASTs), introduces a few use-cases, and showcases the ast module in the Python Standard Library. The content is structured in a top-down fashion, starting from general notion about an AST, and digging deeper up to the point of artificially manipulating an AST to “randomize” the content of some instructions.