Python implementation of basic data structures