I am trying to clear a line for a loading element, I have the printing-on-one-line part of it, I just need this
I have consulted some websites(mainly this one) and I cannot find an answer, I am using https://trinket.io as my coder, I also have python from https://python.org, can you find code that works?
Here is the code I have so far:
import functools
printf = functools.partial(print, end="")
loading():
printf("loading")
printf(".")
time.sleep(.3)
printf(".")
time.sleep(.3)
printf(".")
time.sleep(.3)
printf(".")
time.sleep(.3)
printf(".")
Which gives me this output(final stage):
loading.....
I want to delete the line above so I can use the loading sequence multiple times.