with open("test.html", "w") as file: file.write('

My first SVG

\n') for i in range(30): file.write('\n' % (i*5, i*5, i*2)) file.write('')