+ 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.

21st Dec 2017, 3:51 PM
Drishti Sharma
Drishti Sharma - avatar
4 odpowiedzi
21st Dec 2017, 4:26 PM
David Ashton
David Ashton - avatar
+ 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
21st Dec 2017, 4:12 PM
GAWEN STEASY
GAWEN STEASY - avatar
+ 2
thank you @David for your time :) The link shared by you is of great help in further clarifying my basics. thanks :)
21st Dec 2017, 4:33 PM
Drishti Sharma
Drishti Sharma - avatar
+ 1
thanks @Gawen :)
21st Dec 2017, 4:14 PM
Drishti Sharma
Drishti Sharma - avatar