Answer the question
In order to leave comments, you need to log in
How to pass a list as a function argument?
I am engaged in the implementation of the ODE solution.
It is necessary to pass 4 arguments to the function, two of them are arrays (lists in my case, is it permissible?)
How to do this? Apparently, I misunderstood the chip using the * symbol when passing it to the list function)
(def explicitEulerMethod(n, h, *x, *y) did not work)
Answer the question
In order to leave comments, you need to log in
The asterisk in this case is unpacking. It should be used in the opposite situation - when you need to pass not the list itself, but its elements as separate arguments.
To pass the list itself, no additional tricks are needed. If you just write his name, this is the list itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question