Would using the pickle function be the fastest and most robust way to write an integer to a text file?
Here is the syntax I have so far:
import pickle p
result = 1 f = open('output1.txt','w') # w : writing mode / r : reading mode / a : appending mode f.write('{}'.format(result)) f.close()
f = open('output1.txt', 'r') input1 = f.readline() f.close() print(input1)