Skip to content

Instantly share code, notes, and snippets.

@ilkayisik
Created January 15, 2020 12:59
Show Gist options
  • Save ilkayisik/08b2c2ccd2ce8283bf1a4d22391945f3 to your computer and use it in GitHub Desktop.
Save ilkayisik/08b2c2ccd2ce8283bf1a4d22391945f3 to your computer and use it in GitHub Desktop.
create list of subjects by excluding some subjects
nr_sub = 26
subj_list = []
[subj_list.append('sub-{:02d}'.format(s+1)) for s in range(nr_sub)]
ex_subj = [0, 1, 2, 15, 18]
ex_subj_list = ['sub-{:02d}'.format(i+1) for i in ex_subj]
subj_list2 = [i for i in subj_list if i not in ex_subj_list]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment