sscasc@tumkur multithreading increases the complexity of the program thus also making it difficult to debug it raises the possibility of potential deadlocks it may cause starvation when thread doesn' get regular access to shared resources it would then fail to resume its work creating threads in python python provides "threadclass of threading module to create threads we can create threads in the following different ways creating threads without using class creating thread by creating sub class to thread class creating thread without creating sub class to thread class creating threads without using class in this method, function is created and its name is passed as target for the thread as =thread(target=function_name,[args=(arg ,arg here is the object of thread classthe target represents the function on which the thread will act the args represents tuple of arguments which are passed to the function the tread is started by calling the start(method as start(the thread will execute the function exampleimport time from threading import thread def sleepme( )print("\nthread % going to sleep for seconds itime sleep( print("\nthread % is awake now ifor in range( )th thread(target=sleepmeargs=( )th start(outputthread going to sleep for seconds thread going to sleep for seconds thread going to sleep for seconds thread going to sleep for seconds thread going to sleep for seconds thread is awake now thread is awake now thread is awake now thread is awake now thread is awake now creating thread by creating sub class to thread class by using thread class from threading modulewe can create our own class as sub class to thread classso that we can inherit the functionality of thread class by inheriting thread class we can make use all methods of thread class into sub class the thread class has sp_python programming