I'm pretty new to python, and I'm stuck on a loop/list problem. I have two lists and want to search through the lists to find matching elements and add an item from that list to a new list.
Here's my code:
newList = []
elements = [["Wood", "elem1"], ["Stone", "elem2"], ["Concrete", "elem3"]]
nameNum = [["Wood", "2316"], ["Concrete", "3360"], ["Stone", "2785"]]
The lists can be longer and not always the same length, but just using 3 examples.
What I actually need is newList = ["2316", "2785", "3360"].