McAfee interview question

Python code on string, AWS