f the list to an
    :py:class:`~.Expr`, using ``self.to_sympy()``.
    If ``"alg"``, convert each element of the list to an
    :py:class:`~.AlgebraicNumber`, using ``self.to_alg_num()``.

Examples
========

>>> from sympy import QQ, AlgebraicNumber, sqrt
>>> alpha = AlgebraicNumber(sqrt(5), alias='alpha')
>>> k = QQ.algebraic_field(alpha)
>>> B0 = k.integral_basis()
>>> B1 = k.integral_basis(fmt='sympy')
>>> B2 = k.integral_basis(fmt='alg')
>>> print(B0[1])  # doctest: +SKIP
ANP([mpq(1,2), mpq(1,2)], [mpq(1,1), mpq(0,1), mpq(-5,1)], QQ)
>>> print(B1[1])
1/2 + alpha/2
>>> print(B2[1])
alpha/2 + 1/2

In the last two cases we get legible expressions, which print somewhat
differently because of the different types involved:

>>> print(type(B1[1]))
<class 'sympy.core.add.Add'>
>>> print(type(B2[1]))
<class 'sympy.core.numbers.AlgebraicNumber'>

See Also
========

to_sympy
to_alg_num
maximal_order
r