with open('out.txt', 'w') as f:
    f.write("Hello, world\n")