Summary
In this chapter, we’ve extended our knowledge of Python and introduced or expanded some of the features that demonstrate its power and versatility. For example, we’ve looked at the list and the string, the two data structures that are of most importance to us. We’ve also expanded on the use of loops and other repetitive structures.
We’ve introduced the dictionary, a delightfully elegant data structure that enables us to locate information by a key that describes it, rather than its location in the directory. For example, if we want to convert instruction names into binary op-code, we can create a dictionary and just look up the appropriate code for any mnemonic. This feature really does simplify the design of interpreters and assemblers.
We’ve also looked at one of Python’s more unusual features: list comprehensions. These take a little getting used to, but they can make it much easier to process the text of assembly language...