Unexpected Python print behavior
<p>Just ran into the following Pythonic behavior that I cannot get my head around:</p>

<pre><code>names = ["Paul", "Mary", "Susan"]
names.sort()

def valuate(string):
    print ord('A')
    return sum(ord(s) for s in string)

i = 1
for name in names:
    print i, name, valuate(name)
    i += 1
</code></pre>

<p>which I would expect to output: </p>

<pre><code>65
1 Mary 409
65
2 Paul 402
65
3 Susan 522
</code></pre>

<p>But instead outputs:</p>

<pre><code>1 Mary 65
409
2 Paul 65
402
3 Susan 65
522
</code></pre>

<p>It seems the print statement already tries to output 3 elements, and when print ord('A') is called, takes this to be the third statement?</p>

<p>I did not find any references to this behavior and don't have a clue how I can Google this. By the way, I'm using Python 2.7.3 here. Anyhoo, I'm confused here.</p>
