n = 0
while n != 10:
n += 1
f = open('n.txt', 'w')
f.write(f'n={n}')
n = 0
while n != 10:
n += 1
f = open('n.txt', 'a')
f.write(f'n={n}')
n=1n=2n=3n=4n=5n=6n=7n=8n=9n=10
n = 0
while n != 10:
n += 1
f = open('n.txt', 'w')
f.write(f'n={n}\n')
n=1
n=2
n=3
n=4
n=5
n=6
n=7
n=8
n=9
n=10