Editing python snippets