I'm trying to convert a string number to int in visual studio, but whenever I do it shows me an error.
"c:\Users\USER\Desktop\Appbrewery_course\Day_5\Average_height_exercise.py", line 5, in <module>
student_heights[i] = int(student_heights[i])
ValueError: invalid literal for int() with base 10: '180,'
Here is the below code i have written.
# Don't change the code below
student_heights = input("Input a list of student heights ").split()
print(student_heights)
for i in range(0,len(student_heights)):
student_heights[i] = int(student_heights[i])
# Don't change the code above
print(type(student_heights[0]))