Created
July 10, 2019 18:32
-
-
Save XChrisUnknownX/17003748782747f5d65207b11d70a3c8 to your computer and use it in GitHub Desktop.
Attempts to merge an unlimited number of txt that you specify.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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