+5

Farsi Characters in Python

how to use farsi characters in python console?

10/19/2019 6:54:27 PM

Saman Farrokhi

4 Answers

New Answer

+6

Each character has a unicode, you can find Farsi Characters unicode online, for example: print(u"\u06CC") This will output a Farsi Character, for other characters, you just have to replace the number with the desired one.

+6

if you want to use playground to print for you, do not forget to add the following code on top of the file: import sys import codecs sys.stdout = codecs.getwriter('utf_16')(sys.stdout.buffer, 'strict')

+6

Check this out, i can see some arabic characters(not sure if they're farsi). https://code.sololearn.com/cEeS9k7Hc2Al/?ref=app If that's not what youre looking for, then keep changing the range from 2000-3000 and so on. it may cause a "time limit exceeded error" if range difference is greater than 1000

0

https://code.sololearn.com/cH0lSgaEq8YR/?ref=app