Python Lists
💡
Exercise 26

Mixtape 15 XP Easy

Ctrl+Enter Run Ctrl+S Save

Let's combine lists with loops to create something fun — a mixtape!

The + operator can concatenate (join) two lists:

list_a = [1, 2, 3] list_b = [4, 5, 6] combined = list_a + list_b print(combined) # [1, 2, 3, 4, 5, 6]
📋 Instructions
Create a mixtape with your favorite songs! 1. Create a list called `mixtape` with at least 5 songs 2. Print a header: `My Mixtape 🎵` 3. Print a divider: `-------------------` 4. Loop through and print each song with a track number 5. Print the total number of tracks Example output: ``` My Mixtape 🎵 ------------------- 1. Song Name 2. Another Song ... ------------------- Total tracks: 5 ```
Fill the mixtape list, use enumerate(mixtape, 1) to loop with numbers, and len(mixtape) for total.
⚠️ Try solving it yourself first — you'll learn more!
list_a = [1, 2, 3]
list_b = [4, 5, 6]
combined = list_a + list_b
print(combined)  # [1, 2, 3, 4, 5, 6]
main.py
Hi! I'm Rex 👋
Output
Ready. Press ▶ Run or Ctrl+Enter.