SLB Interview Question

Python programming language logical question