🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Printing Strings on New Lines Without Custom Edits

    UiFlow 2.0
    3
    3
    331
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Comera
      last edited by

      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?

      Captura de tela 2025-04-02 231742.png

      robskiR 1 Reply Last reply Reply Quote 0
      • robskiR
        robski @Comera
        last edited by

        @Comera use labels ?

        M5StickC, M5StickCPlus, M5StickCplus2,M5GO, M5Core, M5Tough, M5Core2, M5 Demo Board, M5Dial, M5Paper, M5Atom, M5Cardputer, M5StampS3, CoreMP135, StamPLC, AirQ

        1 Reply Last reply Reply Quote 0
        • P
          peolsolutions
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post