import sympy


def symbol(name, real=True):
    """
    Create symbolic variables

    :param name: symbol names
    :type name: str
    :param real: assume variable is real, defaults to True
    :type real: bool, optional
    :return: SymPy symbols
    :rtype: sympy

    .. runblock:: pycon

        >>> from spatialmath.base.symbolic import *
        >>> theta = symbol('theta')
        >>> theta
        >>> theta, psi = symbol('theta psi')
        >>> theta
        >>> psi
        >>> q = symbol('q_:6')
        >>> q

    .. note:: In Jupyter symbols are pretty printed.

        - symbols named after greek letters will appear as greek letters
        - underscore means subscript as it does in LaTex, so the symbols ``q``
          above will be subscripted.

    :seealso: :func:`sympy.symbols`
    """
    return sympy.symbols(name, real=real)