Printing Strings on New Lines Without Custom Edits
-
I have a set of blocks (image below) that output both strings inline. Is there a way to print each string on a new line without using custom edits like adding end="\n"? Just wondering if there’s a built-in way to achieve this behavior. Any suggestions?

-
@Comera use labels ?
-
In most programming languages, you can print strings on new lines using escape sequences or built-in functions. In Python, use \n like print("Hello\nWorld"). In JavaScript, console.log("Hello\nWorld") works. Some languages support multiple arguments, like print("Hello", "World", sep="\n") in Python. This method ensures cleaner and structured output.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login