Using Nested If Function Python Questions On For Loop