Lets say I have the following situation:
class myclass: def __init__ (self,myobject) self.myobject=myobject mylist=[myclass(i) for i in range(10)]
So I have a class that has one object, and I have a list of this class. How do I recall (not sure if this is the correct terminology) all the .myobject at once without putting them into a separate list? Obviously I can’t do mylist.myobject to get myobject as a list, and I can’t seem to do mylist[0:-1].myobject. What I want is to get [0,1,2,3,4,5,6,7,8,9] without having to do the original range(10) or put all .myobject into a list. My script is obviously more complicated than this example.