\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{Bio.Seq} \PYG{k+kn}{import} \PYG{n}{Seq}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{Bio.SeqRecord} \PYG{k+kn}{import} \PYG{n}{SeqRecord}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{Bio.Align} \PYG{k+kn}{import} \PYG{n}{MultipleSeqAlignment}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignment} \PYG{o}{=} \PYG{n}{MultipleSeqAlignment}\PYG{p}{(}
\PYG{g+gp}{... }    \PYG{p}{[}
\PYG{g+gp}{... }        \PYG{n}{SeqRecord}\PYG{p}{(}\PYG{n}{Seq}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}ACTCCTA\PYGZdq{}}\PYG{p}{),} \PYG{n+nb}{id}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}seq1\PYGZsq{}}\PYG{p}{),}
\PYG{g+gp}{... }        \PYG{n}{SeqRecord}\PYG{p}{(}\PYG{n}{Seq}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}AAT\PYGZhy{}CTA\PYGZdq{}}\PYG{p}{),} \PYG{n+nb}{id}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}seq2\PYGZsq{}}\PYG{p}{),}
\PYG{g+gp}{... }        \PYG{n}{SeqRecord}\PYG{p}{(}\PYG{n}{Seq}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}CCTACT\PYGZhy{}\PYGZdq{}}\PYG{p}{),} \PYG{n+nb}{id}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}seq3\PYGZsq{}}\PYG{p}{),}
\PYG{g+gp}{... }        \PYG{n}{SeqRecord}\PYG{p}{(}\PYG{n}{Seq}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}TCTCCTC\PYGZdq{}}\PYG{p}{),} \PYG{n+nb}{id}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}seq4\PYGZsq{}}\PYG{p}{),}
\PYG{g+gp}{... }    \PYG{p}{]}
\PYG{g+gp}{... }\PYG{p}{)}
\PYG{g+gp}{...}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{alignment}\PYG{p}{)}
\PYG{g+go}{Alignment with 4 rows and 7 columns}
\PYG{g+go}{ACTCCTA seq1}
\PYG{g+go}{AAT\PYGZhy{}CTA seq2}
\PYG{g+go}{CCTACT\PYGZhy{} seq3}
\PYG{g+go}{TCTCCTC seq4}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{substitutions} \PYG{o}{=} \PYG{n}{alignment}\PYG{o}{.}\PYG{n}{substitutions}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{substitutions}\PYG{p}{)}
\PYG{g+go}{    A    C    T}
\PYG{g+go}{A 2.0  4.5  1.0}
\PYG{g+go}{C 4.5 10.0  0.5}
\PYG{g+go}{T 1.0  0.5 12.0}
\PYG{g+go}{\PYGZlt{}BLANKLINE\PYGZgt{}}
\end{Verbatim}
