Python - passing arguments from one function to a nested function call
python
Solution
Based on your pseudocode:
def function2(type):
print type
def function1(abc, *args):
print "something"
function2(type=abc)
>>> function1("blah", 1, 2, 3)
something
blah
But based on your linked question, maybe you wanted to pass the varargs:
def function2(type, *args):
print type, args
def function1(abc, *args):
print "something"
function2(abc, *args)
>>> function1("blah", 1, 2, 3)
something
blah (1, 2, 3)
Problem
I would like to do something similar to this post, but in Python. I want to pass an argument from `function1(abc)` into `function2` as `type = (abc)`. Pseudocode below: ``` function1 (*args, abc): print xyz function2(type=abc) ```