#! /usr/bin/env python3 with open('x.c', 'w') as f: print('int main(void) { return 0; }', file=f) with open('y', 'w'): pass