'Delete rows from a csv file based on another csv file without using pandas Python<=2.7

ONLY IN PYTHON <= 2.7 AND NO PANDAS IS ALLOWED! I have 2 files: "test.csv" and "input.csv". I want to delete rows in "input.csv" if values from the COD column appears in the "test.csv" COD column. As a result, the new file should be named "output.csv" enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source