\documentclass{article}
\usepackage{python}

\usepackage{Sweave}
\begin{document}

\begin{python}
print "hello"
print "world"
\end{python}

\begin{Schunk}
\begin{Sinput}
> rnorm(10)
\end{Sinput}
\begin{Soutput}
 [1] -0.2384358 -0.4681027 -0.9433950  0.1051647 -0.3333130 -0.3797849
 [7] -2.5275524 -1.7001844  0.2370932 -0.6853732
\end{Soutput}
\end{Schunk}

\end{document}

