forsubdir,dirs,filesinos.walk(dir_path):# Loop through all files in the directory and generate hashes
forfileinfiles:
if'README.md'notinfile:
directories=[dfordinos.path.abspath(subdir).split(os.path.sep)]# list of directories in the file path
student_id=directories[directories.index(csv_suffix)+1]# use the index of 'csv_suffix' which is the gradebook name, and get the next directory which is the student id
submissions_dir_name=''.join(sys.argv[1:])iflen(sys.argv)>1elseexit(f'\nNo submissions dir name given. Provide the name as an argument.\n\nUsage: python {sys.argv[0]} [submissions dir name]\n')
submissions_dir=os.path.join('BB_submissions',submissions_dir_name)# dir with extracted submissions