I want to print a line and replace that line with another text. Example code:
import os
import time
lst = ["|","/","-","\\"]
num = 0
for i in range(500):
os.system("cls") #i don't want to clear the whole terminal window.
print(lst[num])
if num == 3:
num = 0
else:
num = num + 1
time.sleep(0.2)
just like when we install a tar.gz file using pip while building the package's setup.py it prints "building setup.py ,|,-,\" without clearing the console..
I have seen many posts regarding this.. but they all don't have a good answer..
SPECS:
OS: Windows 7 SP1
Python: Python 3.8.10
Arch: x86 (32-bit)