If i had a list of lists, for example:
list = [ [2,3], [4,5], [2,5], [9,2], [3,2]]
how can i write a function that only writes out index[1] of each list in the list?
i need the output to contain 3,5,4,2,2
and then my final goal is to create a loop that goes through the major list and only print out index[0] of the minor lists if they are not in index[1], so in this case, 4 and 9. I tried using a loop in a loop, but its not working. any ideas?
list = [ [2,3], [4,5], [2,5], [9,2], [3,2]]
how can i write a function that only writes out index[1] of each list in the list?
i need the output to contain 3,5,4,2,2
and then my final goal is to create a loop that goes through the major list and only print out index[0] of the minor lists if they are not in index[1], so in this case, 4 and 9. I tried using a loop in a loop, but its not working. any ideas?
Comment