toki_pona/to_csv.py
2023-10-08 18:27:27 +02:00

18 lines
346 B
Python

import csv
from dictionary import toki_pona_en
def main():
with open('dict.csv', 'w+') as f:
for tp, en in toki_pona_en.items():
en_words = en.split(',')
for en_word in en_words:
en_word = en_word.strip()
f.write(f'{tp},{en_word}\n')
if __name__ == '__main__':
main()