Skip to content

Instantly share code, notes, and snippets.

@LanHao0
Created May 1, 2019 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LanHao0/520f9faf3b39678007b928240e9b26aa to your computer and use it in GitHub Desktop.
Save LanHao0/520f9faf3b39678007b928240e9b26aa to your computer and use it in GitHub Desktop.
import glob
read_files = glob.glob("*.txt")
with open("result.txt", "wb") as outfile:
for f in read_files:
with open(f, "rb") as infile:
outfile.write(infile.read())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment