how can i split a file in python?,output.close()