Program zapisuje czas uzyskany w zgadnięciu liczb a następnie zapisuje go w pliku test.txt problem polega na tym, że czas jest nadpisywany za poprzedni. Chcę by każdy kolejny czas był pod poprzednim.
# saving stats
test_file = open('d:\\test.txt', 'w')
test_file.write(('Time: %s'%t4))
if t4 > 15:
test_file.write('\n')
test_file.write('+15 sekund')
if t4 < 15 and t4 >= 5:
test_file.write('\n')
test_file.write('5~15 sekund')
if t4 < 5:
test_file.write('\n')
test_file.write('-5 sekund')
test_file.close()