Skip to content

Instantly share code, notes, and snippets.

@XChrisUnknownX
Created July 10, 2019 18:32
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 XChrisUnknownX/17003748782747f5d65207b11d70a3c8 to your computer and use it in GitHub Desktop.
Save XChrisUnknownX/17003748782747f5d65207b11d70a3c8 to your computer and use it in GitHub Desktop.
Attempts to merge an unlimited number of txt that you specify.
import time
import random
def getnumber():
while True:
x = input("Insert the number of transcripts you wish to merge: ")
try:
x = int(x)
except:
continue
break
return x
def merger(x):
file = []
for sten in range(0,x):
txt = input("Input the name of the transcript you wish to merge: ")
file.append(txt)
filelength = len(file)
filenum = 0
new = open("MergedTranscript.txt","w")
stringing = False
for steno in range(0,filelength):
if stringing == False:
pass
else:
next.close()
new.write(stringing)
new.write("""
""")
next = open(file[filenum],"r")
stringing = next.read()
filenum += 1
next.close()
new.write(stringing)
new.write("""
""")
new.close()
return None
fingers = getnumber()
keys = merger(fingers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment