+ 1

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?

13th Oct 2021, 11:36 AM
onecode
2 Answers
+ 1
Try this : print ("Hi \n there") onecode about \r , this may helps: https://www.codespeedy.com/how-does-carriage-return-work-in-JUMP_LINK__&&__python__&&__JUMP_LINK/ hope it helps...
13th Oct 2021, 12:29 PM
Jayakrishna šŸ‡®šŸ‡³
+ 1
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 !
13th Oct 2021, 1:59 PM
onecode