I'm writing python code in my latex file, but it contain some Arabic texts when I write it using listings in python the Arabic words don't appear!
\documentclass{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}
if(len(tokens[c5]) >= 3):
if (tokens[c5][0] == 'ان' and
pos_tags[c5][1] == 'verb' and
tokens[c5][1] != 'يكون' and
tokens[c5][2] == 'النظام' or
tokens[c5][2] == 'التطبيق' or
tokens[c5][2] == 'البرنامج'):
NF_CF[i] += 53.33
NF_Score[c5] +=1
\end{lstlisting}
\end{document}

listingsto display Unicode characters correctly. There are some workarounds likeliterate(more info see this answer). – Teddy van Jerry Aug 09 '22 at 01:35mintedis more capable of doing more complicated syntax highlighting (as well as Unicode support). The downside is that you have to enable shell escape. – Teddy van Jerry Aug 09 '22 at 01:47