+ 1
Hi, I am complete beginner. Plz can anybody tell me wat does the star (or pointer !!?) before c signifies in the following code?
a,b,*c =[1,2,3,4] output: a=1 b=2 c=[3,4] does (*) is for pointing list here ? I am not sure.
4 Respostas
+ 7
It's the unpacking operator here - see https://stackoverflow.com/questions/6967632/unpacking-extended-unpacking-and-nested-extended-unpacking
+ 5
yeah (*) is representing list here in your example
a, b, *c=[1,2,3,4]
so when you print(a)=>1
print(b)=>3
print(c)=>[3,4]=> because (*) sign represents list so remaining element is located in c
// and only one 🌟 sign can be use in a instruction
+ 2
thank you @David for your time :) The link shared by you is of great help in further clarifying my basics. thanks :)
+ 1
thanks @Gawen :)