If you have a character that separates each directory, you can use that to split the text.
Search about the split function in Python.
' txt.split('') '
If you put the text it's more easy to explain.
I have a directory full of other directories with thousands of text files and I don't know how to parse every file to look for matches. Is there any way in python?
I tried the read file module but I have to specify a directory and I don't know how to open every file, not only the ones I specified.
Is there any way in python to parse files in a directory full of directories full of text files to find for a match?