Print multiple items to single line

Printing multiple values in one statement gives the expected result in the app console, but adds useless empty lines in the running app.

Please remove the useless empty lines.

The following 2 lines on the running app console create 1 and 3 output lines:

print(1, 2, 3)
print(4); print(5); print(6)
# produces this output:
1 2 3
4
5
6

The following 2 lines on the running code create 5 and 3 output lines:

print(1, 2, 3)
print(4); print(5); print(6)
# produces this output:
1

2

3
4
5
6

Sorry I don’t follow, where are you seeing these extra lines?

edit:
This seems to happen for me only when printing code on the server and looking at the app logs.
Is that what you mean?

Sorry for the bad description.

Here is a better one: executing the following code on both client and server side:

  • creates the correct output on the ide console from client
  • creates the correct output on the ide console from server
  • creates the correct output on the app log from the client
  • creates the wrong output on the app log from the server
print(1, 2, 3)
print(4); print(5); print(6)
# produces this output:
1 2 3
4
5
6

The running app’s output to console in the ide is correct from both client and server code:
image

The output to app log is correct from client, wrong from server:
image

1 Like