0
How do I print over some strings that already existed?
For example, I have "Hello World" printed, then the cursor goes back to 'H' and print "Great" so it changes the word into "Great World"
4 Respuestas
+ 3
Nguyễn Văn Hoàng Yeah carriage return doesn't work on SoloLearn's console
+ 2
William Tseng the carriage return \r can be used to override the current line of the terminal. But I don't think it will work on SoloLearn console.
+ 1
You can add it into a variable, print the variable, make changes to it and then print again the same variable. You can also use clear screen function to make it appear like if it was changing
0
that's the only way to achieve it?
Can't we move the cursor around the console?