def ensure_list(param):
 if (not param):
  param = []
 elif (not is_iterable(param)):
  param = [param]
 return param

def ensure_list ( param ) : if ( not param ) : param = [ ] elif ( not is_iterable ( param ) ) : param = [ param ] return param
wrap thing in a list if its a single str .