Skip to content
Advertisement

Check same value in multiple lists [python]

I’ve 5 lists with some Infos saved in like:

JavaScript

What i’d like do is check them and create a table like that’s:

JavaScript

I’ve no worries to import a new library like pandas or others.

I tried to use some nested For loop to check if there’s double values in each list and if was true, add it, but i’ve many trouble to get the by name (ex. List[‘James’]) After some research seems that’s Is not possibile to do in py.

Looking for any kind of solition to understand better.

Advertisement

Answer

Try:

JavaScript

Prints:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement