Python parse text from multiple txt file
问题 Seeking advice on how to mine items from multiple text files to build a dictionary. This text file: https://pastebin.com/Npcp3HCM Was manually transformed into this required data structure: https://drive.google.com/file/d/0B2AJ7rliSQubV0J2Z0d0eXF3bW8/view There are thousands of such text files and they may have different section headings as shown in these examples: https://pastebin.com/wWSPGaLX https://pastebin.com/9Up4RWHu I started off by reading the files from glob import glob txtPth = '..