+ 1
How to replace a printed integer?!
Hi guys, I’m very new in programming and need your help. I want to change this code: X=0 while True: Print(x) X += 1 As you know this code causes to counting in consol, I want that exactly: one integer will print and the previous integer get delete! Please answer, thank you so much...
4 Respuestas
+ 1
X=0
while True:
X += 1
Print(x)
+ 1
That's just how the print method works. My best assumption is to print the x after the while loop has ended so you only get the last one.
In Javascript you can use console.clear() then console.log() to print one at a time, but I don't know of any clear() existing in python, sorry.
+ 1
Ok, thank you anyway
0
No it results same! I want replacement, for example when 10 is printing, 9 get delete, I mean counting somehow like chornometer!