 <p>For Python 3</p> <pre><code>positionNewD = {k: (x, -y) for k, (x, y) in positionD.items()} </code></pre> <p>... as iteritems() has been renamed items()</p> <p><a href="http://docs.python.org/3.1/whatsnew/3.0.html#views-and-iterators-instead-of-lists" rel="nofollow">http://docs.python.org/3.1/whatsnew/3.0.html#views-and-iterators-instead-of-lists</a></p>