Meltwater interview question

Some code snippets relating to python were asked