So stellen Sie einen Timer ein, während die Schleife Python ist
start_time = time.time()
seconds = input("Enter: ")
seconds = int(seconds)
while True:
current_time = time.time()
elapsed_time = current_time - start_time
if elapsed_time > seconds:
print("Finished iterating in: " + str(int(elapsed_time)) + " seconds")
break
Python_Coder