update python snippets