简体   繁体   English

python程序中(\\r)回车的用途是什么?

[英]What Is the Use Of ( \r ) carriage return in python program?

I wrote,我写,

print('C:\docs\rohit')
>>> C:\docsohit

You see rohit is my name but in result, I got docssohit well basically it moves a sentence toward left but in my case specifically in IDLE it is giving something else.你看到 rohit 是我的名字,但结果,我得到了docsohit基本上它向左移动了一个句子,但在我的情况下,特别是在 IDLE 中,它给出了其他东西。 IDLE 3.8.0空闲 3.8.0

Python IDLE does not properly handle control charcaters like \\r , b etc. . Python IDLE 不能正确处理\\rb等控制字符 Use Python console interpreter ( python.exe , python3.exe ) instead.改用 Python 控制台解释器( python.exepython3.exe )。

使用 Visual Studio 并安装 python 插件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM