Sharedlatex-tests / pytest2.texOpen in CoCalc
\documentclass{article}


\usepackage{hyperref}
\usepackage[T1]{fontenc}

\usepackage{pythontex}

\title{Title of Document}
\author{Name of Author}

\begin{document}
\section{Python}

\begin{pycode}
import math
print(r'2 * Pi = {}'.format(2*math.pi))
\end{pycode}

The result of ... is \py{2+5}.

\end{document}