[(1,2), (2,3), (4,5), (3,4), (6,7), (6,7), (3,8)]
How do I return the 2nd value from each tuple inside this list?
Desired output:
[2, 3, 5, 4, 7, 7, 8]
With a list comprehension.
[x[1] for x in L]
2.1m questions
2.1m answers
60 comments
57.0k users