Dive Into Python Output Error
<p>I'm running this code from Dive Into Python:</p>

<pre><code>def buildConnectionString(params):
    """Build a connection string from a dictionary of parameters.
    Returns string."""
    return ";".join(["%s=%s" % (k, v) for k, v in params.items()])
if __name__ == "__main__":
    myParams = {"server":"mpilgrim", \
                "database":"master", \
                "uid":"sa", \
                "pwd":"secret" \
                }
    print buildConnectionString(myParams)
</code></pre>

<p>The book says its output should be:</p>

<pre><code>server=mpilgrim;uid=sa;database=master;pwd=secret
</code></pre>

<p>But when I run it it comes out in reverse:</p>

<pre><code>pwd=secret;database=master;uid=sa;server=mpilgrim
</code></pre>

<p>Any ideas why?</p>
