For Loop And If Else Condition In Python A Namespace