Python If Statement Not Functioning Inside Def Function Stack

Python If Statement Not Functioning Inside Def Function Stack