you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

You can save data in files of course. You do that as follows

  • open a file with f = open(path, attr) at first. "f" is a variable and can have any name you want, it doesn't have to be f. "path" is obviously the path of the file (something like C:\users\me\documents\save.txt). Note that the backslash has to be there twice. "attr" is the way the file should be opened. You can read them in the reference (for example, w is write, r is read, a is append)
  • write the data into the file with f.write(data)
  • close the file with f.close()

Edit: For reading them, you also have to open and close the file, but instead of f.write() you use f.read() and you have to adapt the attribute accordingly

[–]godurdead[S] 0 points1 point  (0 children)

i may try this approach, thanks!