Did I mess something up?
Hello everyone! Basically, I tried putting the code: print (“Hi \r there”) on Python 3.10, but somehow it won’t show ‘Hi’ only ‘there’ with space in the front of it. I’m asking this because one of the lessons on here that talked about ‘\r ‘ showed the same example, and the output for that came out was as expected: Hi there So I’m wondering if I’ve done something wrong? What is the reason that the output is different from the example and when tried on python?
10/13/2021 11:36:42 AMonecode
2 AnswersNew Answer
Try this : print ("Hi \n there") onecode about \r , this may helps: https://www.codespeedy.com/how-does-carriage-return-work-in-python/ hope it helps...
Thank you so much Jayakrishna🇮🇳 !! It worked! Im just a little confused on why it worked as ‘\r’ on the example but it actually works with ‘\n’ if i try it on python 🤔 but i guess i should study more. thanks for the article btw! i will be reading it right now !