Write a python function to check if an item exists in a list and return the boolean value


Topic: Write a python function to check if an item exists in a list and return the boolean value

Solution

def item_exists(lst, item):
    if item in lst:
        return True
    else:
        return False



List all Python Programs