How do I make a file that can only be accessed by the program I write?

I just finished the Blockchain course on Codecademy and want to make my own local cryptocurrency. I want to give individual users an ID number and keep that information in a file. However, if anyone can access the file, that would kind of defeat the purpose of having it. How do I make it so that only my Python program can access the file of user IDs?

Edit: Nevermind. I figured out I could just encode the file so it could only be read by the program.