Create a text file with name filename and about size bytes. The file should contain an incrementing number on each line starting with 0. (ie) 0, 1, 2, 3, .... as many are required to make the file size just >= size. Each line should end with windows newline ("\r\n").
create_file_numbers(filename, size)
should give a file as explained above
i tried using:
while os.path.getsize(filename) < size:
f.write(str(i)+"\r\n")
i += 1
But not getting the required result!