\begin{Verbatim}[commandchars=\\\{\}]
\PYG{k+kn}{from} \PYG{n+nn}{Bio} \PYG{k+kn}{import} \PYG{n}{SeqIO}

\PYG{n}{sizes} \PYG{o}{=} \PYG{p}{[}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{rec}\PYG{p}{)} \PYG{k}{for} \PYG{n}{rec} \PYG{o+ow}{in} \PYG{n}{SeqIO}\PYG{o}{.}\PYG{n}{parse}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}ls\PYGZus{}orchid.fasta\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}fasta\PYGZdq{}}\PYG{p}{)]}

\PYG{k+kn}{import} \PYG{n+nn}{pylab}

\PYG{n}{pylab}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{sizes}\PYG{p}{,} \PYG{n}{bins}\PYG{o}{=}\PYG{l+m+mi}{20}\PYG{p}{)}
\PYG{n}{pylab}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}
    \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+si}{\PYGZpc{}i}\PYG{l+s+s2}{ orchid sequences}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s2}{Lengths }\PYG{l+s+si}{\PYGZpc{}i}\PYG{l+s+s2}{ to }\PYG{l+s+si}{\PYGZpc{}i}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{sizes}\PYG{p}{),} \PYG{n+nb}{min}\PYG{p}{(}\PYG{n}{sizes}\PYG{p}{),} \PYG{n+nb}{max}\PYG{p}{(}\PYG{n}{sizes}\PYG{p}{))}
\PYG{p}{)}
\PYG{n}{pylab}\PYG{o}{.}\PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}Sequence length (bp)\PYGZdq{}}\PYG{p}{)}
\PYG{n}{pylab}\PYG{o}{.}\PYG{n}{ylabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}Count\PYGZdq{}}\PYG{p}{)}
\PYG{n}{pylab}\PYG{o}{.}\PYG{n}{show}\PYG{p}{()}
\end{Verbatim}
