I have been making a program in python 3.9 and after having this code:
#Print 3 dots at the interval shown
def dots(t):
t *= 3
sleep(t)
print('.', end='')
sleep(t)
print('.', end='')
sleep(t)
print('.')
And this calling it:
# These are completely aesthetic
sleep(0.25)
print("Defining Functions", end='')
dots(0.4)
I expected for the program to print Defining Functions and after 1.2 seconds, 3 times, add a dot(.) at the end. What really happened is after 3.85 seconds it printed the whole thing altogether with dots(Defining Functions...). So it has not printed anything until a new line is added(3rd dot).
Sorry if it's messy, I don't know how to make these questions well