instead of my code printing each element in the list on a separate line only the first element is printed. (1, 3, 4). The for loop doesn't seem to be working when in the function but when not in it works fine why is this and how can I fix it?
item_1 = [1, 2, 3]
item_2 = [1, 3, 4]
item_3 = [2]
item_4 = [3, 4]
item_5 = [5]
def recommend(item):
item_list = [item_1, item_2, item_3, item_4, item_5]
item_list.remove(item)
for items in item_list:
return(items)
print(recommend(item_1))