how to delete print statement from console pythonn

import time
for x in range (0,5):  
    b = "Loading" + "." * x
    print (b, end="\r")
    time.sleep(1)

Here is what the above code is Doing:
1. It’s creating a variable called b that is equal to the string “Loading” plus a dot.
2. It’s printing the value of b, and using the end=”\r” argument to tell Python to keep printing on the same line.
3. It’s sleeping for one second.
4. It’s repeating the process five times.