import glob


def xpand(args):
    """
    Expand command line arguments.

    Arguments:
        args: List of arguments.

    Returns:
        Expanded argument list.
    """
    xa = []
    for a in args:
        g = glob.glob(a)
        if g:
            xa += g
        else:
            xa += [a]
    return xa