There are two built-in functions that let you analyze iterables without writing trivial and redundant ifs. These are all and any.
any returns True if some of the values are true; all returns True if all of them are. all returns True for an empty iterable while any returns False in that case.
Both functions are usually useful while used together with list comprehensions:
package_broken = any(
part.is_broken() for part package.get_parts()
)
package_ok = all(
part.ok() for part package.get_parts()
)any and all are usually interchangeable thanks to De Morgan's laws. Choose one that is easier to understand.