(thing)
return thing
Wrap ``thing`` in a list if it's a single str.

    Otherwise, return it unchanged.
Wrap ``thing`` in a list if it's a single str.
Wrap thing in a list if it s a single str .
def ensure_list(thing):
    """
    Wrap ``thing`` in a list if it's a single str.

    Otherwise, return it unchanged.
    """

    if isinstance(thing, str):
        return [thing]
    return thing
def ensure_list ( thing ) : if isinstance ( thing , str ) : return [ thing ] return thing