2

I want to understand the below code snippet from Python :

name, *line=input().split()
scores=list(map(float, line))

I understand input(), split(), map functions. I would like someone to explain me how the assignment name, *line work here and then how variable line is used in subsequent expression.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Ritesh
  • 314
  • 7
  • 19

0 Answers0