Vlookup python

Hi Guys

Any idea or tip how to create in python a function similar to the excel VLOOKUP with more than two variables

eg

A B C
1 P 9
2 L 8
3 I 6
4 Y 4

VLOOKUP(A1;A:C;2;0)

Thanks

Hi,

You would be well off to start with some basic things.

What kind of data objects does the function take in (dictionaries, lists (how many dimensions), strings, etc)?

Then you want to find out how to check for membership in said object:

And then finally, what is the output of the function going to be, some data itself, or no return and just a print statement?

1 Like