Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

How to move the cursor above the first line without overighting it

$
0
0

Here is my code

print("1")print("2")

My desired output

21

I tried using ansi characters but the second line is overighting the first line

print("1")print("\033[3A2")  

output

2

How can I achieve my desired output using other means apart from loop to reverse the order of the print statement

I prefer ansi characters, terminal(), but I will also use other methods


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>