My while loop prints nothing when it is running.
import os
import time
place = 10
running = True
def Write():
j = 1
for i in range(place - 1):
print("-", end = "")
j += 1
print("a", end = "")
for k in range(10 - j):
print("-", end = "")
while running:
Write()
time.sleep(5)
if place > 1:
place -= 1
os.system("clear")
When there is just the print and a time.sleep, the while loop works.
while running:
print("Looping...")
time.sleep(5)
When there is the function and a time.sleep, the code doesn't work.
while running:
Write()
time.sleep(5)
Please tell me how to fix this.