It's not just that you can't put whitespace (tabs, spaces and newlines) after an assigmnent =, you can only put a single "word".
x=1 2 3 4
This means "assign 1 to variable x then run command 2 with arguments 3 and 4. Weird, huh? Why did they design the shell to work like that?
If you do want to assign a value that includes whitespace to a variable you need to quote it;
x='1 2 3 4'
This is powerful; for example it allows you to assign carriage return to a variable, like this
BTW, if you want to see what's in a variable it's helpful to use something like this
Putting it in " quotes allows the shell to "expand" $x, replacing it with its value. Try
Putting ' quotes inside the " quotes lets you see any whitespace at the beginning and especially end of the value. Try
x=' 1234 '