How Python Developers sum Lists of Tuples without writing a for-loop

preview_player
Показать описание
To calculate the sum of a list of numbers, you can use the built-in sum function. But how does that work when the value you want to sum is in a tuple? In this video, you learn how to combine tuple unpacking and generator expressions to sum a list of tuples.

M Y O N L I N E T R A I N I N G

#generatorexpression #unpacking #python
Рекомендации по теме