Script package, python problem


Im trying to run python 3 code. For some reason small things such as
but this just loads forever …

    import time

    signs = ["|", "/", "-", "\\"]
    while True:
        for i in range(4):
             print(signs[i].format(i), end = '\r', flush = True)

I would be very pleased if someone could help me


I think that script prints its output after the script has finished running, not line-by-line. I expect that if you were to remove the while statement, you would see script wait for 2 seconds and then print all of the lines at once.