Data structures and algorithms with OO in Python