Google interview question

simple Python functions, string comparison, list manipulation etc.