Python implementation of various data structures