Error when sorting a list of lists created with zip


#1

Unit 3: Zip two lists together, then sort based on sublist.

code:
toppings = [‘pepperoni’, ‘pineapple’, ‘cheese’, ‘sausage’, ‘olives’, ‘anchovies’, ‘mushrooms’]

prices = [2, 6, 1, 3, 2, 7, 2]

pizzas = zip(prices,toppings)

pizzas.sort()

print(pizzas)

error:
Traceback (most recent call last):
File “script.py”, line 12, in
pizzas.sort
AttributeError: ‘zip’ object has no attribute ‘sort’


#2

Can you provide the exercise url? I need to have a look at the exercise