list = [[1,'abc'], [2, 'bcd'], [3, 'cde']]
I have a list that looks higher.
I want to parse a list and try to get a list containing only the second element of all lists.
output = ['abc','bcd','cde']
I think I can do this by going through the entire list and adding only the second element to the new list, for example:
output = [] for i in list: output.append(i[1])
something like this, but please tell me if there is a better way.
source share