We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

List Operations – Concatenate

Concatenating two lists (smushing them together) is easy in Python, just use the + operator.

total = [1, 2, 3] + [4, 5, 6]
print(total)
# Prints: [1, 2, 3, 4, 5, 6]

Assignment

Fantasy Quest allows users to keep lists of their favorite items. Your job is to finish the concatenate_favorites function. It takes three different lists – the player's favorite_weapons, favorite_armor and favorite_items.