Here's a list:
foo=[(1, 2, {'weight': 1}), (1, 3, {'weight': 2}), (1, 4, {'weight': 3}), (`1 5, {'weight': 4}), (1, 6, {'weight': 5}), (1, 7, {'weight': 6})]
Say I wanted to extract a particular element of each list within foo and store it in a separate list.
e.g. I wanted to extract 2nd element from each list, within foo and save it in the array labelled bar.
bar=[2,3,4,5,6,7]
How can this be done in Python 2.7x?