Skip to content

Instantly share code, notes, and snippets.

@TylerLeite
Created March 5, 2020 03:44
Show Gist options
  • Save TylerLeite/ebcb43ec36a6ba6b26711eac845fb012 to your computer and use it in GitHub Desktop.
Save TylerLeite/ebcb43ec36a6ba6b26711eac845fb012 to your computer and use it in GitHub Desktop.
convert a file to another file
out = []
with open('text/skriblio', 'r') as file:
for line in file:
if '@' in line:
continue
word = line.strip()
if len(word) > 0:
out.append(word)
with open('out/skriblio', 'w') as file:
file.write(','.join(out))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment