pythonic snippets