with open('test.txt', 'w', encoding='utf-8') as f: f.write('ağrı dağı')