Python If Function Not Returning Result As Expected Stack Overflow

Python If Function Not Returning Result As Expected Stack Overflow