5.5. Data Structures

One way to differentiate between high-level and low-level programming languages is by the richness of the data structures built into the language. Using this criterion as a measure, Python is definitely a high-level language.

Python directly supports the concepts of object-oriented programming such as classes, objects, and so on. It also provides a rich assortment of data structures “out of the box.” The three that occur most frequently in XML processing are:

  • Strings

  • Nested lists

  • Dictionaries

5.5.1. Strings

In Python, strings are ordered collections of characters that can shrink and grow to any size, with Python looking after all the details to do with allocating and deallocating memory for them.

 CD-ROM reference=5034.txt ...

Get XML Processing with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.