Add Python implementation

This adds a Python3 implementation