Try this - https://greentreesnakes.readthedocs.io/en/latest/Even Python's official AST doc will point you to this. Apart from that if you have very specific query please reach out to me. I am working in this domain extensively. I have also looked and worked with tree-sitter and bblfish (by source-d) So I can tell you one thing or two about this
Also for more rigorous intro and ideas please look into Dragon Book (Aho, Compiler Design) chapter 2 a bit as well. Apart from that @Edward de Jong / Beads Project had already mentioned some other great resources.
01/12/2020, 7:43 AM
not super experienced with python but would imagine http://pythontutor.com/ to be a good starting point if you haven’t already checked it out