why not sqlite database? It seems perfect for this use case and better than the csv and python support it right from the standard library - https://docs.python.org/3/library/sqlite3.html. It will allow to query if ID is already in the DB (or directly insert if not exists, add time stamps, etc. If in plain text file - csv, json (that would be better than csv), etc. you will need to keep everything in memory and save to disc regularly to prevent data loss.
In a sqlite db I see two tables - one for id and loc and one for id and timestamps
In a sqlite db I see two tables - one for id and loc and one for id and timestamps
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs