+ 6

Farsi Characters in Python

how to use farsi characters in python console?

19th Oct 2019, 6:54 PM
Deleted
4 Answers
+ 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.
19th Oct 2019, 6:59 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 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')
19th Oct 2019, 7:08 PM
Lothar
Lothar - avatar
+ 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
19th Oct 2019, 7:19 PM
Mirielle
Mirielle - avatar
21st Oct 2019, 1:22 PM
Shiyas Shajahan