Help2^9876543

Posts 1–3 of 3 · Page 1 of 1
2^9876543
So I need to solve 2^9876543, I did it in Python command line, but I want to export the answer to a .txt file but I'm terrible at coding can anyone show me the code in python on how to export the answer of 2^9876543 to a .txt file?
Haven't used Python in a while, but I believe file = open(path, rights/mode) should return a file object. After that the most crude way would be to use file.write(string)
print ('Running...')
text = open("Answer.txt", "w")
x = 2**9876543
text.write(str(x))
print ('Complete.')

^What he said.
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Need help?