Python Check If Array Of Structures