xhi, my task is to make a script, which displays the string read from console input in the form of 1 letters / line only. my code looks like this so far

read string
hossz=expr length "$string"
for i in seq 1 $hossz
echo expr substr $string $i 1

my problem is that if the string contains spaces, i only get a bunch of expr syntax errors, else its working correctly. i tried using the tr command to change the spaces into "\n" but i failed to do that too :(. also tried googleing but i couldnt find a solution, so any kind of help would be appreciated

You know the answer already. What's the difference between the two occurences of $string?