In this situation I would normally use '\n'.join(). You can pass any iterable of strings to '\n'.join() - this of course includes things like list comprehensions and generator comprehensions.
For example, using the dict in Andrew Grass's answer, we could make his example more compact, if that's what you prefer:
header = '\n'.join((f'{key}: {value}' for key, value in stuff.items()))
file.write('\n'.join(('-' * 42, header, '-' * 42)))
Of course, you could go further and put it onto one line, but in my opinion that would be too unreadable.
Here's a similar solution which is compatible with Python 3.5 and below (f-strings were introduced in Python 3.6). This is even more compact, but perhaps slightly harder to read:
header = '\n'.join(map("{0[0]}: {0[1]}".format, stuff.items()))
file.write('\n'.join(('-' * 42, header, '-' * 42)))
You could use itertools.starmap to make that last example a bit prettier:
from itertools import starmap
header = '\n'.join(starmap("{}: {}".format, stuff.items()))
file.write('\n'.join(('-' * 42, header, '-' * 42)))
{}in the strings? You aren't calling.format().