1 2 3 4 5 6 7 8 9
with open('main.c', 'w') as fp: print(''' #include <stdio.h> int main(void) { printf(\"Hello World\"); return 0; } ''', file=fp)