How to make two print code in one line?

How can I make two print code in one line?

I tried making print(“hello”) + print(“hello again”) but its not working. Can someone help me?

1 Like

If you want them to output on one line, either concatenate them or pass both as parameters to one statement.

print("hi".." how are you")
--or:
print("hi", " how are you")
3 Likes

In Python you can combine strings with + but not in Lua :slight_smile:

3 Likes

The second line would actually print a double space in the output, the comma already separates the arguments in the final output.

Just so you know :slight_smile:

Yeah, I decided to write the same message despite the double space just for simplicity. I don’t really know why I did it though. Thanks for pointing it out, though.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.