I'm not sure what you mean with "at the same time":
If a sequential processing is fine this
Results = list(map(Function, Values))
print(Results)
or more pythonic a list comprehension
Results = [Function(value) for value in Values]
print(Results)
gives you the following output
Function Running With Values 1 and 2 At timestamp : 1605276375.4642859
Function Running With Values 2 and 3 At timestamp : 1605276375.4645345
Function Running With Values 4 and 5 At timestamp : 1605276375.4647174
Function Running With Values 1 and 4 At timestamp : 1605276375.4648669
[3, 5, 9, 5]
If you actually want multiprocessing then this
import multiprocessing as mp
with mp.Pool() as p:
Results = list(p.map(Function, Values))
print(Results)
or this
from concurrent.futures import ProcessPoolExecutor
with ProcessPoolExecutor() as p:
Results = list(p.map(Function, Values))
print(Results)
gives you output like
Function Running With Values 1 and 2 At timestamp : 1605276375.4532914
Function Running With Values 4 and 5 At timestamp : 1605276375.4547572
Function Running With Values 2 and 3 At timestamp : 1605276375.4549458
Function Running With Values 1 and 4 At timestamp : 1605276375.456188
[3, 5, 9, 5]
If you want multiprocessing then you should look a bit deeper into it to make sure nothing goes wrong and the processing is indeed faster. But your example is a classic MapReduce scenario that should work fine.
Is that what you were looking for?