Correcting the python demo. All tests pass.