+ 1
what is this (x,*a) and (x,**a)?
if i make def like this def name (x,*a) or def name (x,**a) what this "stars" do ?
2 Answers
+ 6
It's a notation for packing/unpacking arguments:
single '*' pack arguments in a list, while double '**' pack named arguments in a dict...
http://hangar.runway7.net/JUMP_LINK__&&__python__&&__JUMP_LINK/packing-unpacking-arguments
+ 1
thank you