How to destruct array to argument list like in javascript?
def foo( arg0, arg1 ): pass
bar = [ 32, 44 ]
foo( ...bar )
It's called argument unpacking. Use the *args
format
foo(*bar)
More info: https://www.geeksforgeeks.org/packing-and-unpacking-arguments-in-python/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With