Guest User

Untitled

a guest
Mar 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. from glob import glob
  2.  
  3.  
  4. def erase_lines_in_files(directory):
  5.  
  6. for filename in glob(f"{directory}*.csv"):
  7. with open(filename, "rb") as f:
  8. lines = f.readlines()
  9.  
  10. for line in lines[1:]:
  11. f.write(line)
Add Comment
Please, Sign In to add comment