STR interview question

Breaking down how some simple python functions worked and what output they would produce