
with open('numbers.txt','w') as fh:
    fh.write('1\n2\n3\n4\n5')
