Revolut interview question

Python structures