The code does not compile. I can’t figure out why the error occurs.
Line 6 problem:
spisok[i] = input()
IndexError: list assignment index out of range
spisok = list()
print('Determine the number of students in your group.')
KolStud= int(input())
for i in range(KolStud):
print('Enter your full name['+str(i)+']: ')
spisok[i] = input()
print(spisok)
Answer 1, authority 100%
as @S already pointed out. Nick, the error is that you are trying to pass an input value to array elements that do not yet exist, use the construction instead:
.append()
which adds elements to the end of the list, or, if the size of the array is known, then you can create an empty array for a specified number of elements, and then fill it.
spisok = [0] * KolStud