list_values function

Internal function that produces a string from a list of values