سلام. روش های مختلفی برای این کار وجود داره. یک روش خیلی ساده اینه:
text = "abc ۰۱۲۳۴۵۶۷۸۹ q59"
new_text = ""
for c in text:
chr_code = ord(c)
new_text += chr(chr_code-1728) if (chr_code>= 1776 and chr_code<=1785) else c
print(new_text)
سلام. روش های مختلفی برای این کار وجود داره. یک روش خیلی ساده اینه:
text = "abc ۰۱۲۳۴۵۶۷۸۹ q59"
new_text = ""
for c in text:
chr_code = ord(c)
new_text += chr(chr_code-1728) if (chr_code>= 1776 and chr_code<=1785) else c
print(new_text)