This is where the variables are defined, now its supposed to take in as an argument a (directory,filename,slicesize) but when I plug it in it gives me an error of “list index out of range”, is there something wrong within this piece of code? Or am I calling it incorrectly?
if __name__=="__main__":
dirname = sys.argv[1]
filename = sys.argv[2]
slicesize = int(sys.argv[3])
sort_big_text_file(dirname,filename,slicesize)
sort_big_text_file('C:/Python/','dotcom_data.txt', 100000)
The problem with what I was doing is that I was calling the function when it executed at the end, and that should’ve came before that last functions, what I believe you would call the main. So instead of what I did, like this: