Slalom Build interview question

Python coding question, theoretical ones