I want to delete specific files from a list of csv files.
the file name is something like this: Storm.abc.ibtracs_all.v03r10.csv. where abc is different for each file.
I have a list of the abc part (namely tmp2) of the files that I want to delete.
my idea is to loop through the list above with the file name as variable and pass it to glob to get the file name that matches and then delete it
import globfor i in range(len(tmp2)):name=tmp2[i]files=glob.glob('*.name.*')os.remove(files)
I doesnt work obviously. please help with the treatment of glob.glob('.name.')