How do I extract a list of lists from a user defined function and print the results as strings for each list?