def var(names, **args):
    """
    Create symbols and inject them into the global namespace.

    INPUT:
-            s -- a string, either a single variable name, or
-                 a space separated list of variable names, or
-                 a list of variable names.

    This calls :func:`symbols` with the same arguments and puts the results
    into the *global* namespace. It's recommended not to use :func:`var` in
    library code, where :func:`symbols` has to be used::

    Examples
    ========

    >>> from symengine import var

    >>> var('x')
    x
    >>> x
    x

    >>> var('a,ab,abc')
    (a, ab, abc)
    >>> abc
    abc

    See :func:`symbols` documentation for more details on what kinds of
    arguments can be passed to :func:`var`.

    """
    def traverse(symbols, frame):
        """Recursively inject symbols to the global namespace. """
        for symbol in symbols:
            if isinstance(symbol, Basic):
                frame.f_globals[symbol.__str__()] = symbol
            # Once we hace an undefined function class
            # implemented, put a check for function here
            else:
                traverse(symbol, frame)

    from inspect import currentframe
    frame = currentframe().f_back

    try:
        syms = symbols(names, **args)

        if syms is not None:
            if isinstance(syms, Basic):
                frame.f_globals[syms.__str__()] = syms
            # Once we hace an undefined function class
            # implemented, put a check for function here
            else:
                traverse(syms, frame)
    finally:
        del frame  # break cyclic dependencies as stated in inspect docs

    return syms
Create symbols and inject them into the global namespace.

    INPUT:
-            s -- a string, either a single variable name, or
-                 a space separated list of variable names, or
-                 a list of variable names.

    This calls :func:`symbols` with the same arguments and puts the results
    into the *global* namespace. It's recommended not to use :func:`var` in
    library code, where :func:`symbols` has to be used::

    Examples
    ========

    >>> from symengine import var

    >>> var('x')
    x
    >>> x
    x

    >>> var('a,ab,abc')
    (a, ab, abc)
    >>> abc
    abc

    See :func:`symbols` documentation for more details on what kinds of
    arguments can be passed to :func:`var`.