Hi, Can you try using mmap. See the link below for more information.
Regards, Thiru https://docs.python.org/3/library/mmap.html On Thu, 24 Jun 2021 at 6:22 AM Saravanan Muthuramalingam < saravana4...@gmail.com> wrote: > Hello Abirami , > > I'm presuming your doing search in python by reading text file which is > big in size ?, if yes then give it a try with while loop and yield , so > that you can load portion or batches of data into memory and do search > operation , thanks > > Saravanan Muthuramalingam > > On Wed, 23 Jun 2021, 13:48 Abirami Moorthy, <mabirami8...@gmail.com> > wrote: > >> Hello, I'm tried to search the words from text file this having 25lakhs >> above word. It's take long time to progress. Kindly share ways to find the >> words in 1min maximum. >> >> >> >> Regards, >> M.Abirami >> >> _______________________________________________ >> Chennaipy mailing list >> Chennaipy@python.org >> https://mail.python.org/mailman/listinfo/chennaipy >> > _______________________________________________ > Chennaipy mailing list > Chennaipy@python.org > https://mail.python.org/mailman/listinfo/chennaipy >
_______________________________________________ Chennaipy mailing list Chennaipy@python.org https://mail.python.org/mailman/listinfo/chennaipy