0

I have a huge list made of names ( in hexa ) every names lengh is from 2 to 40 lengh. After checking this thread on SO I could not manage to get it work.

The idea is to store the name every time I call the script ( easy append ) . to Be able to provide this list at will And finally to check ( either the name is on memory or in the file) a name is on that list.

any thought ?

MouIdri
  • 1,300
  • 1
  • 18
  • 37
  • 2
    If the list is so big that it's causing memory issues, why not use a sqlite db? Then you can just query it without needing to load all the data into memory. – SuperStew Jan 29 '18 at 23:01
  • 1
    Which specific part of [Alternatives to keeping large lists in memory (python)](https://stackoverflow.com/questions/1989251/alternatives-to-keeping-large-lists-in-memory-python) that you tried did not work? – cowbert Jan 29 '18 at 23:04
  • @SuperStew : I do not want the DB.. I tried in the past, it is working... I want to get things in python only no other languages. – MouIdri Jan 29 '18 at 23:08
  • @MouIdri You can create/query a sqlite db entirely in python, unless you are counting the SQL statements as a separate language. Which, technically yea I guess they are, but like regex, they are important for any programmer to know. – SuperStew Jan 29 '18 at 23:09
  • @ SuperStew : it is actually linked to my code. I was using DB but I do need to use a file instead. @ cowbert : Actually the thread is about a list of array and there is not action on sorting a given name from the file. – MouIdri Jan 29 '18 at 23:10
  • You said that you could not get https://stackoverflow.com/questions/1989251/alternatives-to-keeping-large-lists-in-memory-python to work. Which part did not work and how did it fail? – cdarke Jan 29 '18 at 23:17
  • @MouIdri if you have a problem with sorting, then state that in your question. EDIT: I guess by "sorting" you mean searching. – cowbert Jan 29 '18 at 23:17
  • You should use the DB. – juanpa.arrivillaga Jan 29 '18 at 23:23

0 Answers0