right-to-left languages in Python

Viewed 8358

I want to write a Hebrew string in Python and then show it onscreen. The problem is that I get a mirror view of what I wrote. How can I set the string to use RTL instead of left to right?

2 Answers

I know I'm pretty late to the party, but you can always use:

 " שלום hello "[::-1]

But the real solution is to use:

from bidi.algorithm import get_display
print(get_display("היי"))
Related