.
.
.
.
…
.
.
.
…
.
.
.
…
.
.
…
.
.
…
.
.
.
.
.
…
.
…
def get_packages_info(packages):
# Tu código aquí 👈
weight = [package[1] for package in packages]
tuple_destinations = tuple(package[2] for package in packages)
destinations = {destino: tuple_destinations.count(destino)
for destino in tuple_destinations}
total_weight = round(sum(weight),2)
return {"total_weight": total_weight,
"destinations": destinations
}
¿Quieres ver más aportes, preguntas y respuestas de la comunidad?