Get startedGet started for free

DJ Sets

To practice working with data structures, you decide to split up the music artists in your playlist by genre, allowing you to create sets for each genre.

In this exercise, you'll create a set to hold indie artists as well as convert a list of hip-hop artists into a set.

This exercise is part of the course

Introduction to Python for Developers

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

hip_hop = ["Drake", "JAY-Z", "50 Cent", "Drake"]

# Create a set
____
Edit and Run Code