• + 0 comments

    end Parameter in print(): The end parameter in the print() function determines what character or string is appended at the end of the output after the printed arguments. By default, end is set to '\n' (the newline character), which causes each subsequent print() statement to begin on a new line. You can customize this behavior by assigning a different string to the end parameter. For example, setting end=' ' will cause the print() statement to end with a space instead of a newline, keeping the next output on the same line.

    print("Hello", end=' ') print("World!") Hello World!

    print("Hello", end=' ') print("World!")