How do I multiply elements within a list?

list = {{1}, {2, 3}, {4, 5, 6}, {7}, {8,9}}

Desired output:

{1, 6, 120, 7, 72}

closed as off-topic by Kuba, Szabolcs, dr.blochwave, user9660, MarcoB Oct 29 '15 at 12:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Kuba, Szabolcs, dr.blochwave, Community
If this question can be reworded to fit the rules in the help center, please edit the question.


or type:

Apply[Times, list, {1}]

This is less elegant than the shorthand Times @@@ list but shows how Times can be applied to different levelspecs.


Not the answer you're looking for? Browse other questions tagged or ask your own question.