pythonify code