Final answer:
The Python function all_mappings returns a list of 2-value tuples created from a given dictionary that maps strings to lists of integers.
Step-by-step explanation:
To achieve the task described, we'll write a Python function named all_mappings. This function will take a single dictionary as its input, where the keys are strings and the values are lists of integers. It will return a list of 2-value tuples, each consisting of a key from the dictionary and one of the integers from its associated list.
Here's a Python function that implements this functionality:
def all_mappings(D):
result = []
for key, value_list in D.items():
for value in value_list:
result.append((key, value))
return result
This function iterates through each key-value pair in the dictionary. For each key, it goes through the corresponding list of integers, creating a tuple with the key and each individual integer, which are then added to the result list.