← Back to challenges

Product of All Odd Integers

PythonHardarraysnumbers

Instructions

Create a function that returns the product of all odd integers in a list.

Examples

odd_product([3, 4, 1, 1, 5]) ➞ 15

odd_product([5, 5, 8, 2, 4, 32]) ➞ 25

odd_product([1, 2, 1, 2, 1, 2, 1, 2]) ➞ 1

Notes

N/A

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Same ASCII?