Print automatically generates a newline at the end of the expression that is being printed. How do you suppress this automatic newline?

  • $\begingroup$ So Print /@ {1, 2, 3}; should generate 123 below/in messages notebook? What about prints in future, should they append this 123? $\endgroup$ – Kuba Jan 8 '18 at 13:46
  • $\begingroup$ assemble what you want to print as a single expression first. $\endgroup$ – george2079 Jan 8 '18 at 13:51

A solution to this problem is to write strings to the standard output directly. For instance,

WriteString[$Output, "aaa"];
WriteString[$Output, "bbb"];
  • $\begingroup$ It is not what Print does if one has PrintToConsole settings on. $\endgroup$ – Kuba Jan 8 '18 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.