0

I am using carriage return in between a string. However, it is not working as expected.

string = 'My website is Latracal \rSolution'
print(string)

Expected Output:

Solutionte is Latracal

Actual Output:

My website is Latracal Solution

My python version is python 3.10 I am using IDLE as the terminal emulator.

When running the same code in PyCharm I get the following output:

Solution
meallhour
  • 13,921
  • 21
  • 60
  • 117
  • What terminal emulator are you using? Does it support overwriting lines? – Brian61354270 Oct 20 '21 at 21:02
  • Related: [How to overwrite the previous print to stdout in python?](https://stackoverflow.com/q/5419389/11082165) – Brian61354270 Oct 20 '21 at 21:04
  • 2
    Are you using IDLE? If so, this may be a duplicate of [Carriage Return not working in IDLE?](https://stackoverflow.com/q/35768165/11082165). Otherwise it may be a duplicate of the more general [Python carriage return not working](https://stackoverflow.com/q/26575014/11082165) – Brian61354270 Oct 20 '21 at 21:08
  • can you please check my updated question? – meallhour Oct 20 '21 at 23:22

0 Answers0