def un_nested (l) :
    """Returns list `l` in un-nested form (i.e., if it is a one-element list
       whose first element is a list, returns l [0]).

       This is handy if you want to support the passing of a list to a `*
       args' argument without using `apply`.

       >>> un_nested (list (range (3)))
       [0, 1, 2]
       >>> un_nested ([list (range (3))])
       [0, 1, 2]
       >>> un_nested ([list (range (3)), list (range (2))])
       [[0, 1, 2], [0, 1]]
    """
    if l and len (l) == 1 and isinstance (l [0], (list, tuple)) :
        l = l [0]
    return l