Clash Royale CLAN TAG #URR8PPP Better method to check all objects' parameters with a single call I want to get all objects which age is less than 18. How can easily do that? Should I had to pass all objects to get_nonage to get it? class People: def __init__(self, uid, age): self.uid = uid self.age = age def get_nonage(self): # print nonage here which age<18 # expected output: {1: 11, 3: 15} pass p1 = People(1, 11) p2 = People(2, 20) p3 = People(3, 15) ... People.get_nonage() People.get_nonage() First, get_nonage should probably not be an instance method. Second, yes, you will have to pass it all of the People object if you want it to search all of the People objects. But that implies that you should be storing them in a list, instead of in a bunch of separate variables. Then you just pass the list. – abarnert 13 mins ago ...