in reply to Re^2: print statement changes results!
in thread print statement changes results!

It was just a stab in the dark. Clearly, since the OP's problem has been solved, buffering has nothing to do with it. The OP presented a snippet of code with no input data or output data, and, in my opinion, a vague description of a mysterious print-related issue. I took an educated guess that the OP maybe wasn't showing us more print statements.

I figured maybe trying to flush might at least eliminate that as a possibility. I'm just trying to help. And I'm here to learn.

Replies are listed 'Best First'.
Re^4: print statement changes results!
by chromatic (Archbishop) on Jun 06, 2011 at 22:06 UTC
    I'm just trying to help.

    I understand that, and I appreciate that, and I don't mean to sound like I'm trying to chastise you.

    I was merely curious if you knew about something related to buffering that could affect things. I've never come across anything of the sort.