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 312 views
1 answer 281 views
1 answer 221 views
1 answer 230 views
230 views asked Jul 27, 2022 by avibootz
...