Zipper data structure for python