This function is from CSDN,I encapsulated it a little
Upload is for easy use in the future
Because I don't remember where I saw it, I don't add a link.
If there is any infringement, I will delete it immediately.
You should only enter two parameters, the first is the directory you want to cut the file, and the second is how many lines you need to cut a file.
Just like
python file_split.py /mnt/1.csv 2000