Skip to content

Instantly share code, notes, and snippets.

@kargaranamir
Created January 30, 2023 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kargaranamir/858588ea291fab4fe56e03d4afc6c0e8 to your computer and use it in GitHub Desktop.
Save kargaranamir/858588ea291fab4fe56e03d4afc6c0e8 to your computer and use it in GitHub Desktop.
vocab_latex
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