\documentclass{article}
\usepackage{tcolorbox,fancyvrb}
\tcbuselibrary{skins,breakable}

%-------------------------------------------------- Code Environment
\newenvironment{code}
 {\VerbatimEnvironment
  \begin{tcolorbox}[
    breakable,
    colback=red!5!white,
    colframe=red!75!black,
  ]%
  \begin{Verbatim}}
 {\end{Verbatim}\end{tcolorbox}}

\newenvironment{outc}
 {\begin{tcolorbox}[
    breakable,
    left=0mm,right=0mm,top=0mm,bottom=0mm,
%    boxsep=0mm,
    colback=white,
    coltext=blue,
    colframe=gray!50,
  ]}%
 {\end{tcolorbox}}

%\newenvironment{outcode}
% {\begin{outc}\begin{equation}} 
% {\end{equation}\end{outc}}
\newenvironment{outcode}
 {\begin{outc}\[} 
 {\]\end{outc}}
%-------------------------------------------------- Code Environment

\begin{document}

In this example, we see too much space between this two environment \textbf{code} and \textbf{outcode}:

\begin{code}
> 2+3; 
\end{code}
\begin{outcode}
5
\end{outcode}

\end{document}