Menu
Coddy logo textTech

Practice #3

Lesson 11 of 11 in Coddy's Sets in Python course.

challenge icon

Challenge

Easy

Write a function named recommended_products that takes two lists as input: viewed (a list of products viewed by a user) and purchased (a list of products purchased by the same user). The function should return a list of products that were viewed but not purchased in alphabetical order.

Try it yourself

def recommended_products(viewed, purchased):
    # Write code here

All lessons in Sets in Python