How to call a function after a delay of N seconds in Python

1 Answer

0 votes
import threading
import time

def func():
  print("func()")
  
seconds = 2
t = threading.Timer(seconds, func)
t.start()


'''
run:

func()

'''

 



answered Oct 12, 2024 by avibootz

Related questions

1 answer 314 views
1 answer 284 views
1 answer 222 views
1 answer 232 views
232 views asked Jul 27, 2022 by avibootz
...