Created
June 10, 2020 20:19
-
-
Save shohei/727a6386a91d74a53bb8d1faaa7c94d2 to your computer and use it in GitHub Desktop.
Subtitle format code
This file contains hidden or 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
sentences = [] | |
fout = open("output.txt","w") | |
with open("sub.txt") as f: | |
lines = f.readlines() | |
for line in lines: | |
if not line in sentences: | |
sentences.append(line) | |
fout.write(line) | |
fout.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment