Kodewick
Start learning →
Starter←→0 / 80

Museum guest book

#032StarterDicts2 min

The museum has a guest book at the door, and people sign it every time they come in, so one person may sign several times a day. Write unique_visitors(stamps) to return how many different people came today. An empty book gives 0.

Examples
unique_visitors(["Mia", "Leo", "Mia"])→2
unique_visitors([])→0
main.py
def unique_visitors(stamps):
    # your code here: put the names in a set and count it
    return 0
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.