0

What means * ?

... For _ in range(some_list): arg1, *arg2 = input().split() arg3 = list(map(float, arg2)) ...

24th Aug 2018, 12:33 PM
Denis
Denis - avatar
2 Respuestas
+ 1
The * (splat operator) is used for creating starred expressions. Here's what it is used to do in your case: >>> a, *b, c = [1, 2, 3, 4, 5] >>> a 1 >>> b [2, 3, 4] >>> c 5 More detailed explanations here: http://stackoverflow.com/questions/5239856/foggy-on-asterisk-in-JUMP_LINK__&&__python__&&__JUMP_LINK
24th Aug 2018, 3:08 PM
Just A Rather Ridiculously Long Username
0
Thanks
2nd Sep 2018, 3:11 PM
Denis
Denis - avatar