How to generate a file, of a given length, filled with random content, with Python? -
i need generate file filled random contents, , size of file should of size, no more, no less, 1000 bytes. have small piece of c code can finish task, need in python.
import os open('randomdata', 'wb') f: f.write(os.urandom(1000))
Comments
Post a Comment