Comprehension consistency at last in Python 3.0!
Comprehension consistency at last in Python 3.0!. Nice example of how comprehensions in Python 3.0 seem a lot more intuitive. Earlier in Python 2.5 : Python 2.5.2 (r252:60911, Nov 14 2008, 19:46:32) [GCC 4.3.2] on linux2 Type “help”, “copyright”, “credits” or “license” for more information. >>> >>> dict((n, n*n) for n in range(5)) {0: 0, [...]
Posted on December 5, 2008 at 10:59 am by Dhananjay Nene · Permalink
· Comments Closed
In: Interesting · Tagged with: comprehensions, python
In: Interesting · Tagged with: comprehensions, python
