Given a Python function def is_fruit(item): return item in fruits where fruits is a Python list, is there a design issue?
Asked in the CoderPad Online Assessment stage. Implement the corrected design for repeated membership checks.
Implement fruit_membership(fruits, items). fruits is a list of strings representing known fruits, and items is a list of strings to check. Return a list of booleans in the same order as items.
def fruit_membership(fruits, items):