Factorizing the python snippets
Adding another template to answers