I know Python has many ways of storing and reading data from files, so I would like to know what the best practices are for the above 4, and when each is most applicable.
Also, please let me know if there are any other modules/functions I should be aware of.
Well i’m sure you’ve read the documentation of the above commands in python, but i think you’re in a mistake of it’s use. For file openning as you ask the open is quite good enough within a while statement.
But as i said previously, the best way to treat with files to dump (commands read/write) if no special treatment required just use the open, write commands.
Regards.