LaTex linenumbering
I can't manage to add linenumbers left of the boxes. Can anybody help me?

    \documentclass{article}
    
    \begin{document}
    
    \fbox{\fbox{
    
    \begin{minipage}{0.8\linewidth}
    
    \textbf{def} mapper (key, value):
    
    \hspace{7mm}\textbf{for} word \textbf{in} value.split():
    
    \hspace{14mm}\textbf{yield} word, 1\\
    
    \textbf{def} reducer (key , values):
    
    \hspace{7mm}\textbf{yield} key, sum(values)\\
    
    
    \textbf{if} name == "main":
    
    \hspace{7mm}\textbf{import} dumbo
    
    \hspace{7mm}dumbo.run (mapper, reducer, combiner=reducer )
    
    \end{minipage}
    
    }}
    
    \end{document}

Thanks
LaTex linenumbering
===

I can't manage to add linenumbers left of the boxes. Can anybody help me?

    \documentclass{article}
    
    \begin{document}
    
    \fbox{\fbox{
    
    \begin{minipage}{0.8\linewidth}
    
    \textbf{def} mapper (key, value):
    
    \hspace{7mm}\textbf{for} word \textbf{in} value.split():
    
    \hspace{14mm}\textbf{yield} word, 1\\
    
    \textbf{def} reducer (key , values):
    
    \hspace{7mm}\textbf{yield} key, sum(values)\\
    
    
    \textbf{if} name == "main":
    
    \hspace{7mm}\textbf{import} dumbo
    
    \hspace{7mm}dumbo.run (mapper, reducer, combiner=reducer )
    
    \end{minipage}
    
    }}
    
    \end{document}

Thanks