Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def product(numbers):
- num_product = 1
- for number in numbers:
- num_product = num_product * number
- return num_product
- print(product([1, 2, 3]))
- print(product([4, 5, 6, 7]))
- print(product([10]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement