Implementation of basic data structures in Python