added print and log snippets to python