Here i am trying to have an input of a course name, and whoever has that course in their info, pop up in the format person - identify, but it says that a 'set' object is not subscriptable, what does that mean?
people = []
info = input().split(':')
while len(info) > 1:
for i in range(0, len(info), 3):
name = info[i]
identify = int(info[i+1])
course = info[i+2]
new_person = name, identify, course
people.append({new_person})
info = input().split(':')
else:
for person in [person for person in people if info[0] in {person['course']}]:
print(f'{person["name"]} - {person["identify"]}')