Answer the question
In order to leave comments, you need to log in
What number will be written last to the numbers.txt file?
Hey!
I myself answered 9999, but the answer is wrong.
from threading import Thread
def just_print():
with open('numbers.txt', 'w') as f:
for i in range(10_000):
f.write(str(i) + '\n')
print('finished just_print')
t1 = Thread(target=just_print)
t1.daemon = True
t1.start()
for i in range(10):
print(i*2)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question