How might I go about simplifying this code, preferably putting it into a loop or one line?
object1.callMethod()
object2.callMethod()
object3.callMethod()
difObject1.callDifMethod()
difObject2.callDifMethod()
difObject3.callDifMethod()
I know that I can put the objects in a list and iterate through that, however, that would still require two separate loops and two separate lists. Is there any way that I can make a singular list of [1,2,3] and use that to distinguish between the three different objects of each type, since the numbers are in the object names as well?