Created
January 30, 2023 12:24
-
-
Save kargaranamir/858588ea291fab4fe56e03d4afc6c0e8 to your computer and use it in GitHub Desktop.
vocab_latex
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 csv | |
file = open('vocab_first_column_persian_second_column_english') | |
csvreader = csv.reader(file) | |
start_b = "آ" | |
for header in csvreader: | |
start_a = header[0].strip()[0] | |
if start_a !=start_b: | |
print("\n" + "\dicalphabet{" + start_a + "}") | |
start_b = start_a | |
print("\dic{" + header[1].strip()+ "}{" +header[0].strip() + "}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment