/Users/smcho/Desktop/bracket/[10,20] directory has \"abc.txt\", but when I run this Python code
import glob import os.path path1 = \"/Users/smcho/Desktop/br
You could use path.replace('[', '[[]') to have arbitrary input paths handled by glob correctly.
path.replace('[', '[[]')
glob