Mmap throws an error: mmap object has no attribute 'split'
Mmap throws an error: mmap object has no attribute 'split' Question: I am writing a code that should search faster in a large file using mmap. import re import mmap with open(‘words.txt’, ‘r’, encoding="utf8") as f1, open(‘source.txt’, ‘r’, encoding="utf8") as f2, open(‘output.txt’, ‘w’, encoding="utf8") as output_file: # Map the contents of file1 and file2 into …