$ python2.7 Python 2.7.3 (default, Apr 13 2012, 13:51:30) >>> {i: i+1 for i in range(5)} {0: 1, 1: 2, 2: 3, 3: 4, 4: 5}