I was wondering if anybody knew how I could change a script in Python so it goes through a folder containing csv files and takes them in groups of three. The script is working when I type the file names in the command line, but I've got lots of files, so that would take forever. It looks like this now:
resultsdir = "blah"
#filename1=sys.argv[1]
#filename2=sys.argv[2]
#filename3=sys.argv[3]
file1 = open(resultsdir+"/"+filename1+".csv")
file2 = open(resultsdir+"/"+filename2+".csv")
file3 = open(resultsdir+"/"+filename3+".csv")
I'm a complete beginner, I hope I've been able to explain what I want. Cheers for any help!