I think 'unpack' might be the wrong vocabulary here - apologies because I'm sure this is a duplicate question.
My question is pretty simple: in a function that expects a list of items, how can I pass a Python list item without getting an error?
my_list = ['red', 'blue', 'orange']
function_that_needs_strings('red', 'blue', 'orange') # works!
function_that_needs_strings(my_list) # breaks!
Surely there must be a way to expand the list, and pass the function 'red','blue','orange'
on the hoof?
question from:
https://stackoverflow.com/questions/65865632/python-how-to-pass-secondary-arguments-to-a-nested-function 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…