In many applications a separate control character called "manual line break" exists for forcing line breaks inside a single paragraph. The glyph for the control character for a hard return is usually a pilcrow (¶), and for the manual line break is usually a carriage return arrow (↵).
In ASCII, newline is X'0A'. In EBCDIC, newline is X'15'. (For example, ASCII code page ISO8859-1 and EBCDIC code page IBM-1047 translate back and forth between these characters.) Windows programs normally use a carriage return followed by a line feed character at the end of each line of a text file.
The new line character in Python is \n . It is used to indicate the end of a line of text. You can print strings without adding a new line with end = <character> , which <character> is the character that will be used to separate the lines.
Line Feed Character The Line Feed (LF) character moves the cursor down to the next line without returning to the beginning of the line. This character is used as the new line character in Unix based systems (Linux, macOS X, Android, etc).
There are several possibilities. The choice may depend on font, too, since not all of them are available in all fonts, and some of them have rather varying shapes, and some work better in small sizes than others:
⤶ U+2936 ARROW POINTING DOWNWARDS THEN CURVING LEFTWARDS
↵ U+21B5 DOWNWARDS ARROW WITH CORNER LEFTWARDS
⏎ U+23CE RETURN SYMBOL
↲ U+21B2 DOWNWARDS ARROW WITH TIP LEFTWARDS
↩ U+21A9 LEFTWARDS ARROW WITH HOOK
To represent an abstract idea of new line, rather than a symbol reflecting a keyboard key for new line, you could consider these, too:
␍ U+240D SYMBOL FOR CARRIAGE RETURN
 U+2424 SYMBOL FOR NEWLINE
This is how they render on OS X 10.8.5
(Same on FF26/Chrome32/Safari6):
And this is Win7/IE
:
Win7+FF looks pretty the same, but Chrome32+Win7
has a problem with U+2936
:
8 Years later, this is Win10+Crome91:
What about right-to-left languages? Let's test it!
<div dir="rtl" style="white-space: pre">
مثال ⤶ U+2936 ARROW POINTING DOWNWARDS THEN CURVING LEFTWARDS
مثال ↵ U+21B5 DOWNWARDS ARROW WITH CORNER LEFTWARDS
مثال ⏎ U+23CE RETURN SYMBOL
مثال ↲ U+21B2 DOWNWARDS ARROW WITH TIP LEFTWARDS
مثال ↩ U+21A9 LEFTWARDS ARROW WITH HOOK
مثال ␍ U+240D SYMBOL FOR CARRIAGE RETURN
مثال  U+2424 SYMBOL FOR NEWLINE
</div>
In my browser, it renders like this:
As you can see, the arrows stay pointing in the same direction, even when right-to-left mode has been set. This may or may not be what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With