Hi, kind of simple thing but for some reason I’m struggling with the iterations
in python and the indentations
where it stars/end is still very confusing to me.
I have two files.
One is a CSV file that contains names and Mac addresses
The second file also has MAC addresses and some other stuff.
I’m trying to find if the second file MAC addresses are in the First file.
Here is a code I have but for some reason it doesn't iterate.


I have two files.
One is a CSV file that contains names and Mac addresses
The second file also has MAC addresses and some other stuff.
I’m trying to find if the second file MAC addresses are in the First file.
Here is a code I have but for some reason it doesn't iterate.
cur_stat_macs = 'C:/Scripts/All_MAC_Files-TESTING-File.txt' csv_file_macs = 'C:/Scripts/MACs.csv' with open (cur_stat_macs,'r') as cur_macs, open (csv_file_macs,'r') as csv_macs : for current in cur_macs : current=current.rstrip() current=current.split(",") current[2]=current[2].rstrip() for csv in csv_macs : csv=csv.rstrip() if current[2] in csv : print ("Line found -->> "+csv) else : print ("Not Found --- >>"+csv)Thank you.