Advertisement
Mofeoluwa

Untitled

Feb 22nd, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def product(list1): #function named product with argument named list
  2.     result = 1 #set result as 1
  3.     for x in list1:
  4.          result = result * x
  5.     print(result)
  6. sage = [1,3,2]
  7. product(sage)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement