Python snippets and programs