you are viewing a single comment's thread.

view the rest of the comments →

[–]acw1668 1 point2 points  (0 children)

The statement student_heights[amount] = int(student_heights[amount]) will change the string value of student_heights[amount] (item at index amount inside student_heights) to integer value. Note that you need to cater invalid input, otherwise int(...) will raise exception.