How to force Mathematica to output an expression such as
Input {2,3,4}-> Output 2*3*4=24
as a Times like this one:
Input Times[2,3,4] -> Output 24
lst = {2, 3, 4};
Apply[Inactive[Times]]@# == Times @@ # &@lst
2*3*4==24
Or, for purposes of display,
Inactive[Set][Apply[Inactive[Times]]@#, Times @@ #] & @ lst
2*3*4=24
and
Row[{Inactive[Times] @@ #, Times @@ #}, "="] & @ lst
2*3*4=24
Times @@ lst
wherelst={2,3,4}
$\endgroup$