from functools import reduce

#Forma tradicional
valores = [2,4,6,5,4]
suma = 0
for el in valores:
    suma += el
print(suma)
#21

print('================================')

#Con reduce y lambda
valores = [2,4,6,5,4]
suma = reduce(lambda x,y: x+y, valores)
print(suma)
#21
580a81799ae8d9e8bcd2e06a4f5164419c2ab559
<mask token>

<mask token>
for el in valores:
    suma += el
print(suma)
print('================================')
<mask token>
print(suma)

<mask token>
valores = [2, 4, 6, 5, 4]
suma = 0
for el in valores:
    suma += el
print(suma)
print('================================')
valores = [2, 4, 6, 5, 4]
suma = reduce(lambda x, y: x + y, valores)
print(suma)

from functools import reduce
valores = [2, 4, 6, 5, 4]
suma = 0
for el in valores:
    suma += el
print(suma)
print('================================')
valores = [2, 4, 6, 5, 4]
suma = reduce(lambda x, y: x + y, valores)
print(suma)

from functools import reduce

#Forma tradicional
valores = [2,4,6,5,4]
suma = 0
for el in valores:
    suma += el
print(suma)
#21

print('================================')

#Con reduce y lambda
valores = [2,4,6,5,4]
suma = reduce(lambda x,y: x+y, valores)
print(suma)
#21