How to multiply the elements of a tuple in Python

1 Answer

0 votes
import math

tpl = (5, 9, 3, 1, 89, 250)

tpl = math.prod(tpl)

print(tpl) 
 
   
   
   
'''
run:
   
3003750
 
'''

 



answered Jul 24, 2022 by avibootz
...