Advertisement
Blessing988

Untitled

Feb 21st, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. def product(a_list_of_numbers):
  2.     initial = 1
  3.     for number in a_list_of_numbers:
  4.         initial*=number
  5.     print(initial)
  6.  
  7. product([1,4,7,8,9,10,12])  #Example (The argument must be a list strictly containing numbers)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement