2

As you see both inputs below give the same results. Is there any reason to use List[3] instead of just 3 in the first case?

Table[1,{3}]
(* {1,1,1} *)

Table[1,3]
(* {1,1,1} *)
xzczd
  • 65,995
  • 9
  • 163
  • 468
emnha
  • 2,101
  • 13
  • 26

1 Answers1

2

If you're before v10.3, then only the first syntax is correct. For more information check:

Why does Table behave differently in Mathematica compared to WolframCloud?

BTW this syntax change causes problem in certain cases:

Unexpected behaviour from Table[]

xzczd
  • 65,995
  • 9
  • 163
  • 468