\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{Bio} \PYG{k+kn}{import} \PYG{n}{ExPASy}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{Bio} \PYG{k+kn}{import} \PYG{n}{SwissProt}

\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{accessions} \PYG{o}{=} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}O23729\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}O23730\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}O23731\PYGZdq{}}\PYG{p}{]}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{records} \PYG{o}{=} \PYG{p}{[]}

\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{for} \PYG{n}{accession} \PYG{o+ow}{in} \PYG{n}{accessions}\PYG{p}{:}
\PYG{g+gp}{... }    \PYG{n}{handle} \PYG{o}{=} \PYG{n}{ExPASy}\PYG{o}{.}\PYG{n}{get\PYGZus{}sprot\PYGZus{}raw}\PYG{p}{(}\PYG{n}{accession}\PYG{p}{)}
\PYG{g+gp}{... }    \PYG{n}{record} \PYG{o}{=} \PYG{n}{SwissProt}\PYG{o}{.}\PYG{n}{read}\PYG{p}{(}\PYG{n}{handle}\PYG{p}{)}
\PYG{g+gp}{... }    \PYG{n}{records}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{record}\PYG{p}{)}
\end{Verbatim}
