\documentclass{article}

\usepackage{xcolor}
\usepackage{listings}
\lstset{%
   language={python},
   breaklines=true,
   numbers=left,
   numberstyle=\footnotesize,
   captionpos=b,
   basicstyle=\ttfamily,
   keywordstyle=\bfseries\color{blue},
   commentstyle=\itshape\color{green},
   moredelim=[il][\color{red}]{/+},%
   }

\begin{document}

\begin{lstlisting}
def f(n): # fonction utile
  if n == 0:
    return n
  else:
/+    return 1 + f(n-1)
\end{lstlisting}

\end{document}