I have simple class like this
class MyClass():
def test(self):
print "Calling Test"
Then i create a list:
lobj=[MyClass() for i in range (100)]
Now I want to iterate each object in lobj and invoke its medthod test().
I know i can use for loop. However, i wonder if there is any other way (just to avoid the for loop when the list is relatively large)? For example
lobj[:].test()
testfunction?forloop? Any thing that calls a method on each object is going to do exactly the same thing.