ProbePlus interview question

Python related and not,or diagram