Section 1. Chapter 13
single
Challenge: Customer Segmentation Using Sets
Swipe to show menu
Task
Swipe to start coding
A company wants to understand its customer base. You are given two lists of customer IDs:
new_customers: customers who made their first purchase this month;repeat_customers: customers who have made purchases in previous months.
Follow this steps:
- Сonvert lists to sets to remove duplicates.
- Find all unique customers.
- Identify customers who shopped in both categories.
- Identify customers who are new only (not repeat customers).
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 13
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat