Пиво
Водка
Текила
drink "Пиво"
{
key = "Пиво";
lemma = "Пиво";
}
with open('test.txt','r') as f:
with open('test.gzt','a') as ff:
ff.write(templ(f.read()))
def templ(word):
a = '''
drink "'''+word+'''"
{
key = "'''+word+'''";
lemma = "'''+word+'''";
}'''
return a