Instead of futzing around with Python, I decided to create a two-pass assembler, and wrote a version of the first pass, in which the label definitions are dealt with, both explicit and inline. I won’t create a professional grade assembler, just a hobby one. 👨💻