0

I tried this code with english characters works with no problem but i when i want to test it with kurdish characters it will not add anything to new file here is my ckb.txt:

چ
چۆنی
باشی
سوپاس
ئاسمان
یاسا
دەنگ

ckbnew.txt is empty textfile which i want to add text from ckb.txt

This is my code:

import unicodedata

f = open('ckb.txt', 'r')
d = open('ckbnew.txt', 'w')
g = f.readlines()
for line in g:
    if line.startswith('\u0686') :
        d.write(line)
    print(line)
Roshin Raphel
  • 2,478
  • 3
  • 18
  • 34
Jwtiyar
  • 23
  • 6

0 Answers0