Add python solution.

Currently wrought with race conditions and possible deadlocks.