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?
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?
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")
In Python you can combine strings with + but not in Lua
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
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.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.