I do not know if I explain writting but I just want to get something like the screenshot with nodes but in python, basically remove from other list whatever index has empty list from a list of sublists.
You need to zip the two lists together so that you can loop through them simultaneously. Then you can just check to see if the item in List1 is empty. If it’s empty, do nothing. If it’s not, add the respective List2 item to an output list.
Try doing some research on your own before asking people to give you the answer.
This thread has a ton of good resources for Python in general.
There are plenty of other threads that deal with list comprehension and zipping lists. The alternative is to use an index counter for the length of your lists and use that to manually coordinate pairs, but I think zipping is better practice.
This page gives a quick rundown of what list zipping is and how you can use it to pair list values.
I think you could also use ennumurate function in a forloop to get the indices of all empty lists and then iterate through your other list with those indices to retrieve them.