Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from typing import Union
- def product(*args: Union[int, float]) -> Union[int, float]:
- s, n = list(args), 1
- for i in range(len(s)):
- n *= args[i]
- return n
- print(product(1, 3, 2, 4, 6))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement