I have a list of unique file paths read from a csv file and I would like to filter this list via a number of ways. One of which is to exclude paths that contain specific words. I have created a list of words but I'm not sure how to use it to filter the paths. The below code doesn't work.
with open("C:\MXD\dataSources.csv") as csvfile:
pathList = csvfile.readlines()
vendMastList = ["Vendor", "vendor", "master", "Master"]
for pth in pathList:
for vendMast in vendMastList:
if vendMast not in pth:
print pth