0
n = int(input())       //to get input for n entries
student_marks = {}            //dictionary for storing key value pair
for _ in range(n):
    line = (input().split())            //line for getting the entries
    name, scores = line[0], line[1:]
    scores = list(map(float, scores))
    student_marks[name] = scores               //storing in in dictionary

The entities in calling "line" variable is a string , but when I call "scores" variable it becomes numeric.please explain how is that possible because I should get some error in it of converting the values into numeric while applying float function.

sample Input :

1 raj 32 43 32

0 Answers0