comments1 = {1 : 'Rockies', 2: 'Red Sox'} for idx, item in enumerate(comments1.items()): print(idx, item)
Standard input is empty
0 (1, 'Rockies') 1 (2, 'Red Sox')
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!