Sorry for the bad title, but I didn't know how to formulate it better ^^.
What I'm trying to do is iterate over a list of objects, and then iterate over a list that's a member of each object.
So something like this:
class FooObj:
def __init__(self):
self.list = [1, "Hello", 3.4] #some list thats unique for each object
objects = [...] # some list of FooObj's
for o in objects:
for e in o.list:
# Do something for each list element
That's the way I would do it 'traditionally'. I'm interested if there's a way to condensate the two for loops into one?
Thanks for your help ^^