I have an example array like:
array = [1, 2, 3, 4, 5, 6]
Every of this numbers refers to an object that has text property. I want to make sure that every of these object has the same text value. Currently I do it like this:
correct =  for number in array: if(object[number].text == "Sample"): correct.append(number) if correct.length == array.length: return True
Is there a more efficient way to do this, like with lambda function or?