1

Here is the problem that I cannot seem to solve.

So I run a For loop and "List" print outs come out of nowhere, how do I get rid of them

KrisU
  • 11
  • 1
  • 2
    Index zero of an expression is its head. In this case the head is List. – Daniel Huber Mar 07 '22 at 21:33
  • 2
    Also: don't use For. Use Table / Grid. – Szabolcs Mar 07 '22 at 21:37
  • 1
    to expand on the head being List: {a, b, c} is actually syntactic sugar for List[a, b, c]. for any expression f[a, b, c, ...], f is called the head. You can take the n'th part [[n]] of any expression, not just lists; in the above, f is part 0 of f[a, b, c, ...], a is part 1, b is part 2, etc. so {a, b, c}[[0]] is List, and lists (as datatypes) are therefore 1-indexed in Mathematica. – thorimur Mar 07 '22 at 21:51

0 Answers0