Skip to content

Instantly share code, notes, and snippets.

@shohei
Created June 10, 2020 20:19
Show Gist options
  • Save shohei/727a6386a91d74a53bb8d1faaa7c94d2 to your computer and use it in GitHub Desktop.
Save shohei/727a6386a91d74a53bb8d1faaa7c94d2 to your computer and use it in GitHub Desktop.
Subtitle format code
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