How to save results of fonction as file (*.txt)? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to save results of fonction as file (*.txt)?

How to create a fonction that save a result of an other fonction as file (*.txt)

22nd Oct 2019, 6:06 AM
eco strophe
eco strophe - avatar
1 Answer
0
1. Call the function, whose value you wanted to store. 2. Store the value and convert to string in case it's not already a string. 3. With basic file handling write the previous string to a text file. 4. Put 1, 2 and 3 to a function, which you wanted to write to the text file.
22nd Oct 2019, 6:18 AM
Seb TheS
Seb TheS - avatar