The map function applies a function or method to each element in a list and returns a new list with the results.