+ 1
How do i define a funcition in python that creates files?
I have to use files to save data about users and I thought that the easiest way to do this in a big programme was by defining a function. Is it alright to do this? Can someone help me?
3 Answers
+ 3
I found this article helpful when I started:
https://www.pythonforbeginners.com/files/reading-and-writing-files-in-JUMP_LINK__&&__python__&&__JUMP_LINK
+ 3
Here is a short tutorial for basic file operations:
https://code.sololearn.com/cESZeFlM1cRR/?ref=app
+ 1
Maybe just
open("file.extension", "r"|"w")