def oo_prepend_strings_in_list(data, prepend):
 if (not isinstance(data, list)):
  raise errors.AnsibleFilterError('|failed expects first param is a list')
 if (not all((isinstance(x, string_types) for x in data))):
  raise errors.AnsibleFilterError('|failed expects first param is a list of strings')
 retval = [(prepend + s) for s in data]
 return retval

def oo_prepend_strings_in_list ( data , prepend ) : if ( not isinstance ( data , list ) ) : raise errors . AnsibleFilterError ( '|failed expects first param is a list' ) if ( not all ( ( isinstance ( x , string_types ) for x in data ) ) ) : raise errors . AnsibleFilterError ( '|failed expects first param is a list of strings' ) retval = [ ( prepend + s ) for s in data ] return retval
this takes a list of strings and prepends a string to each item in the list ex: data = [cart .