I need to create files of arbitrary size that contain no data. The are potentially quite large. While I could just loop through and write a single null character until I've reached the file size, that seems ugly.
with open(filename,'wb') as f:
# what goes here?
What is the efficient, pythonic way to do this?