\documentclass{article}
\usepackage{listings}
\lstloadlanguages{Python}
\begin{document}
hello
\lstinputlisting{testfile}
\end{document}

