get_display function in bidi.algorithm module skip zero width non-joiner character.
In [1]: from bidi.algorithm import get_display
In [2]: raw_text = u'سلام'
In [3]: print(len(raw_text))
5
In [4]: text = get_display(raw_text)
In [5]: print(len(text))
4
In [6]: print(text)
مالس
get_display function in bidi.algorithm module skip zero width non-joiner character.