I have two variables:
unique_val = [1,2,3]
nested_list = [['name1',1],['name2',1],['name3',3],['name4',2],['name5',2],['name6',3]]
Basically I want separate lists of the names at each unique value. I struggled to put together a set of nested for loops to no avail.
Ideally the output would be something like this:
list_1 = ['name1','name2']
list_2 = ['name4','name5']
list_3 = ['name3',name6']