Updated python snippets