1>>> d = {1:-0.3246, 2:-0.9185, 3:-3985}
2
3>>> d.values()
4<<< [-0.3246, -0.9185, -3985]
1test_data = [{'id':1, 'value':'one'}, {'id':2, 'value':'two'}, {'id':3, 'value':'three'}]
2
3generator = ( item['value'] for item in test_data )
4
5...
6
7for i in generator:
8 do_something(i)
9