On 9 March 2018 at 01:07, 노연수 <clear0...@naver.com> wrote:
> If you type print (" hello\ rpython ") into the python 3.7.0.b2, only the 
> python is printed and i learned it's a crystal. However, if you type print (" 
> hello\ rpython ") in the python 3.7.0.b2 idle, it is output as hellopython. I 
> wonder why it prints like this. I would appreciate your answer.
>
> I have attached the file so I would appreciate your reference.
> --
> https://mail.python.org/mailman/listinfo/python-list

In both cases, 'hellopython' is printed, only the behavior of the
cursor changes. The `\r` means “move cursor to the start of the line”
in some places, including Terminal/Command Prompt. But not everyone
processes the backspace character — IDLE ignores it, as do many other
text editors.

Another important thing to note about \r is this:

>>> print("python\rhi")
hithon

(PS. it’s better to use a stable version, especially when you’re
learning. PPS. file attachments do not work on this list.)

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16<div class="gmail_extra"><br><div class="gmail_quote">On
9 March 2018 at 01:07, 노연수 <span dir="ltr">&lt;<a
href="mailto:clear0...@naver.com";
target="_blank">clear0...@naver.com</a>&gt;</span>
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">If you type print ("
hello\ rpython ") into the python 3.7.0.b2, only the python is printed
and i learned it's a crystal. However, if you type print (" hello\
rpython ") in the python 3.7.0.b2 idle, it is output as hellopython. I
wonder why it prints like this. I would appreciate your answer.<br>
<br>
I have attached the file so I would appreciate your reference.<br>
<span class="HOEnZb"><font color="#888888">--<br>
<a href="https://mail.python.org/mailman/listinfo/python-list";
data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=https://mail.python.org/mailman/listinfo/python-list&amp;source=gmail&amp;ust=1520708438742000&amp;usg=AFQjCNGayj8GjRvThJd0aWdvjz6jUEPsgA";
rel="noreferrer"
target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>--
<br><div class="gmail_signature"
data-smartmail="gmail_signature">Chris Warrick &lt;<a
href="https://chriswarrick.com/";
target="_blank">https://chriswarrick.com/</a>&gt;<br>PGP:
5EAAEA16</div>
</div>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to