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
  • 107,083
  • 22
  • 201
  • 376
Ritesh
  • 314
  • 6
  • 19

0 Answers0