\documentclass{article}
\usepackage{listings}
\lstnewenvironment{mpython}{\lstset{%
language=Python,
frame=lines,
basicstyle=\ttfamily,
columns=flexible,
showspaces=false,
breaklines=true,
breakatwhitespace=true,
showstringspaces=false
}}{}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{minipage}[t]{0.25\textwidth}
\centering
Mathematical representation $\Rightarrow$
\end{minipage}\hspace{1em}
\begin{minipage}{0.6\textwidth}
\[ \bar{x} = \frac{x_1 + \ldots + x_n}{n} = \frac{1}{n} \Sigma^n_{i = 1} x_i \]