I have a list with 1000 items in it but only want to call a certain range of them.
class myClass():
def event(self):
#do stuff
my_list = [myClass(i) for i in range(1000)]
#incorrect part:
my_list[0 - 10].event()
Meaning that I am trying to call "event" for only the first 9 objects. What would be the correct way to write this?