Synchrony interview question

Dealing with responses from api in python