Nov-15-2022, 05:44 AM
Greetings!
I want to scan a .csv file, find cells with dates, and create a list of dates.
then I'd like to check the same file and find strings that contain the dates from the list.
I'm going to process the lines later.
Here is the code that does not work
Thank you.
I want to scan a .csv file, find cells with dates, and create a list of dates.
then I'd like to check the same file and find strings that contain the dates from the list.
I'm going to process the lines later.
Here is the code that does not work

1 2 3 4 5 6 7 8 9 10 11 12 |
with open ( 'C:/01/Logs_Scan_removed_prt.csv' , 'r' ) as ftor : for el in ftor : el.strip() el = el.split( "," ) tof = el[ 4 ] dates.append(el[ 4 ]) for el in ftor : #print(el) for ed in dates : print ( f " ++ {ed}" ) if ed in el : print ( f " found Line -> {el}" ) |