I have a function that takes multiple arguments of tuples and process it accordingly. I was wondering if I can pass the arguments in a for-loop. For example:
def func(*args):
for a in args:
print(f'first {a[0]} then {a[1]} last {a[2]}')
Then I would call the function as
func(('is', 'this', 'idk'), (1,2,3), ('a', '3', 2))
My question is if there is a way that I could modify the function calling in a loop without changing the function definition itself:
func((i, i, i) for i in 'yes'))
such that it will print:
first y then y last y
first e then e last e
first s then s last s