The environment is Python 3.6 and win10 x64.
I wanted to output the string '123456\rabc'
by using print()
, the right result should be 'abc456'
, but I got different answers.
1. IPython:
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: print('123456\rabc')
abc456
In [2]:
2. python.exe
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print('123456\rabc')
abc456
>>>
3. Sublime Text3
print('123456\rabc')
I run the file test.py, and the result was this:
123456
abc
[Finished in 0.1s]
4. PyCharm 2017.2.3 x64
I still run test.py, the result was:
C:\Users\user\Anaconda3\python.exe C:/Users/user/Desktop/cv/test.py
abc
Process finished with exit code 0
So I don't know why these results are different.