'Unpack dictionary values into function arguments

I would like to unpack dictionary values and pass them into function arguments. I have a 1D dictionary that might contain strings, integers and floats or all together as values.

In the example code Im using the latest case. The dictionary contains integers, floats and strings as values.

Example Dictionary

my_dict = {'name': 'String VaLue', 'id': 1, 'price': 10.5 }

Example function:

def exampleFunction(valueA, valueB, ValueC):
    # Do something

I have tried using the values() function to extract the values but I get a float value error.

Desired result:

my_dict = {'name': 'String VaLue', 'id': 1, 'price': 10.5 }

# Dictionary value extraction

# Passing extracted values as function arguments
 result = exampleFunction('String VaLue', 1, 10.5)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source