I now have a list with the content re=['test1','test2','test3'], and a csv or xlsx or txt with two columns of data
The effect I want to achieve is that if the element of re is equal to column A in the file, then the row of data in column AB of the file will be output. How to implement this specifically?
You need to read the file first, then put the result into the array
and then search the value of the array
Output
If the content of lookup.csv is
This is a very basic operation of using the csv module, it is recommended to take a look