Python Logical Interview Questions