So I'm trying to print out a list that looks a little bit something like this (setq lst (list '- '- '- '- '-))
and in the past I used the print command to print out the whole list, however, when printing the whole list there is parenthesis on each side which I do not want to see. I want to use something like (format t)
to print every bit of my list and I have something like this set up.
(loop for item from 0 to 4
do (progn
(format t "~X" (nth item lst))
)
)
This code prints out the list perfectly fine like this, -----
but as a mentioned, I want it to print spaces between each element so that it is output like this - - - - -
. I used the conditional "~X"
because I looked up how to output spaces with the format command and you are apparently supposed to use "~X"
but it does not work so if anybody knows how I could put spaces between elements that would be greatly appreciated.