Print an AST

Report a typo

There is a predefined variable code that contains the source code. Build its AST and print it.

We hope you remember that ast.parse() takes the source code and parses it into an AST node and ast.dump() prints the actual AST
Write a program in Python 3
import ast

# put your code here
___

Create a free account to access the full topic