Reputation: 69
I have a function that I can not edit, this function expects 3 arguments
def rgb_color(r,g,b):
print(r,g,b)
now I have these values as an array, I can change this var if needed to a list or something
black = [0, 0, 0]
Is there a way to pass the variable black to the function without using
black[0], black[1], black[2]
something like
call_user_function(rgb_color, black)
Upvotes: 3
Views: 2546