There is a module in the standard library for working with CSV files: https://docs.python.org/3/library/csv.html. You really should familiarise yourself with the standard library docs if you haven't already.
Also, why do you want to stop people reading your script? Who'll be using it anyway? As for stopping edits, can't you just use whatever your OS has for managing permissions? Looks like you're on Windows, so I can't help further with that.
Also, why do you want to stop people reading your script? Who'll be using it anyway? As for stopping edits, can't you just use whatever your OS has for managing permissions? Looks like you're on Windows, so I can't help further with that.