I have a problem statement:
splitfile(filename,numberoffiles)
A file of 13 lines, split in 3, would have output files of length 4, 4 and 5 if they cannot be evenly distributed. ( Can not have a difference greater than 1 line if they cant be evenly distributed)
I started learning python and I have to create a function that will split a file into smaller ones as specified in the parameters.
The thing I am having trouble with is I do not know how to approach this scenario due to it being based off of number of files and the concept of having a difference greater than 1 being non permissible.