I want to turn over the two-dimensional list as a factor for the Python zip function, what should I do? Like the JavaScript application method.
def myFunc(a1, a2, a3):
do_something(...)
myFunc.some_method([1,2,3])
Even if you put the factor in this way, I hope the result comes out as if you just did myFunc(1,2,3)
.
>>> def my_func(a1, a2, a3):
return a1+a2+a3
>>> my_func([1,2,3])
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
my_func([1,2,3])
TypeError: my_func() missing 2 required positional arguments: 'a2' and 'a3'
>>> my_func(*[1,2,3])
6
>>> a = [1,2,3]
>>> my_func(*a)
6
771 GDB gets version error when attempting to debug with the Presense SDK (IDE)
1235 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
758 Error in x, y, and format string must not be None
856 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2025 OneMinuteCode. All rights reserved.