I use minted to style my codes in a document. But in some cases, there is a weird box in the code in which most of the time a quotation mark is encircled.
The following MWE shows my problematic issue.
\documentclass{article}
\usepackage{minted}
\begin{document}
\begin{minted}{python}
>>> str
<class 'str'>
>>> str.count
<method 'count' of 'str' objects>
\end{minted}
\end{document}

classas a keyword for the declaration of a class (which has a name and not a quoted string), not as terminal output. So you have to create your own lexer (which is not related to minted, but pygmentize) or search for a python console lexer (which seems to exist in pygments.lexers.python.PythonConsoleLexer). – TeXnician Aug 04 '18 at 09:00pyconlexer, notpython. – G. Poore Aug 06 '18 at 13:22mintedand it does everything! Is there any option for applying it to get a better result? – javadr Aug 07 '18 at 07:12\begin{minted}{python}->\begin{minted}{pycon}– G. Poore Aug 07 '18 at 10:46