threading once thread is created it must be started to become eligible for execution using the thread start(method the following illustrates very simple program that creates thread that will run the simple_worker(functionfrom threading import thread def simple_worker()print('hello'create new thread and start it the thread will run the function simple_worker thread(target=simple_workert start(in this examplethe thread will execute the function simple_worker the main code will be executed by the main thread that is present when the program startsthere are thus two threads used in the above programmain and the thread class the thread class defines all the facilities required to create an object that can execute within its own lightweight process the key methods arestart(start the thread' activity it must be called at most once per thread object it arranges for the object' run(method to be invoked in separate thread of control this method will raise runtimeerror if called more than once on the same thread object run(method representing the thread' activity you may override this method in subclass the standard run(method invokes the callable object passed to the object' constructor as the target argumentif anywith positional and keyword arguments taken from the args and kwargs argumentsrespectively you should not call this method directly join(timeout nonewait until the thread sent this message terminates this blocks the calling thread until the thread whose join()method is called terminates when the timeout argument is present and not noneit should be floating-point number specifying timeout for the operation in seconds (or fractions thereofa thread can be join()ed many times name string used for identification purposes only it has no semantics multiple threads may be given the same name the initial name is set by the constructor giving thread name can be useful for debugging purposes ident the 'thread identifierof this thread or none if the thread has not been started this is nonzero integer