Here's an example:
\documentclass{article}
\usepackage[sharp]{easylist} % use # symbol to denote a list
\usepackage{minted}
\begin{document}
\begin{easylist}[enumerate]
# Profile Python
\begin{minted}{python}
import math
\end{minted}
\end{easylist}
\end{document}
To make it work, I could just use other symbols like \usepackage[at]{easylist} instead of sharp. But I am curious because error message cannn't really tell me why is this not working. Do someone know the why I cannot use #?
The error message is:
_./main.out.pyg:2:
Use of \FV@PYG doesn't match its definition.
\PYG #1#2->\FV@PYG {
#1}{\FancyVerbBreakStart #2\FancyVerbBreakStop }
l.2 \PYG{k+kn}{import} \PYG{n+nn}{math}
Update:
Please see @egreg's answer below (and comments!) for an explanation.
A solution to the above question using \Activate and \Deactivate command provided by easylist.:
\documentclass{article}
\usepackage[sharp]{easylist} % use # symbol to denote a list
\usepackage[cache=false]{minted}
\title{useless}
\begin{document}
\begin{easylist}[enumerate]
# Deactivate it first,
\Deactivate
\begin{minted}{python}
import math
\end{minted}
\Activate
# then activate it again.
# Good!
\end{easylist}
\end{document}

mintedinsideeasylistto begin with? – egreg Feb 16 '18 at 18:41verbatimworks ineasylist, why notminted? @egreg – taper Feb 16 '18 at 19:03#is used inminted. And sincemintedis loaded ineasylist,easylistadjust what#means and this clashes withminted. So the choice would only be use another symbol foreasylist. – taper Feb 16 '18 at 19:14