0

Let's say I have an array [2, 3], and I want to pass that into a function. Not as function([2, 3]), as function(2, 3). Is there anyway to do that, like function(pass(array))?

1 Answers1

1

Check this out (it utilizes the unpacking operator *):

array = [2, 3]
function(*array)
Seth
  • 2,214
  • 1
  • 7
  • 21