[python] How to call same method for a list of objects?