I am writing a list comprehension. My goal is to get a list in return, but for some reason I'm getting a set, even though i'm doing a comprehension on a list. Currently I have code that looks like this:
filteredList = {obj.index for obj in myObjectList if filter(obj) == True}
When I check the type of 'myObjectList', it's a list, but when I check the type of 'filteredList', it's a set. Why is a comprehension done on a list giving me a set?