0

This is my code

xyzzy = 1;
Hold[xyzzy] // ToString // StringLength

The output is 11.

This 2nd one below.

ClearAll[xyzzy]
 ToString[xyzzy] // StringLength]

The output is 5.

Why is this?

I think these 2 codes will be the same output

kile
  • 1,671
  • 5
  • 10

1 Answers1

2

Your first code acts as below line:

StringLength["Hold[xyzzy]"]

And second one acts as below line:

StringLength["xyzzy"]