+ 5
How is * args accessed inside a function ? The answer is args without asterisk!An interesting and wise question. I like it.
8 ответов
+ 6
We did not understand. I did not mean to hurt you. I do not think you're malicious. Thanks for the advice, man!
+ 5
On my page, everything that teaches us something with fun or trick is worth starting a post. What is seen is that you have spoken with your malicious commentary :).
Do you agree with me, young gentleman?
+ 4
Yes the values are are later on wrapped into a tuple and then passed
+ 3
*arg is taken as a tuple.
+ 2
after its passed into the function it works as a tuple but you don't have to input it as a tuple.
def test(arg1, arg2, *args)
print(arg2, arg1)
print(args)
test(1,2,3,4,5,6)
+ 1
was this really worth starting a post ?
+ 1
Well its good to know and obvious, also i'm 90% sure that this is included in the lessons here.
I'm not malicious, I'm questioning the need of this post, since if this is missing from the functional programming lessons the right place for this would be the sololearn feedback section instead of the Questions and Answers section since here it will disappear in a few days where as in lessons it would be always available.
+ 1
As the tuple args