Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def product(list):
- product = 1
- '''iterating over each number in list, we
- have:'''
- for number in list:
- product *= number
- #product = product * number
- return product
- print(product([3, 5, 7, 9, 12]))
- print(product([30, 40, 50, 60]))
- print(product([3])
Advertisement
Add Comment
Please, Sign In to add comment