In the python notebook I would like to pass the temp argument in the first line to the last line, but am not sure how to do that.
def grabdata(statefolders, temp, split_by):
for folder in statefolders:
sub = folder.split('_')[split_by]
new_name = sub + '_out.txt'
!cp {folder}/done/sigdet_output*out temp{new_name}
SyntaxError. Do you want to do something likesubprocess.run('cp {folder}/done/sigdet_output*out {temp}{new_name}'.format(folder=folder, temp=temp, new_name=new_name), shell=True)?