return value (print()' return value is always noneas the target keyword argument it doesn' pass the print(function itself when passing arguments to function in new threaduse the threading thread(function' args and kwargs keyword arguments concurrency issues you can easily create several new threads and have them all running at the same time but multiple threads can also cause problems called concurrency issues these issues happen when threads read and write variables at the same timecausing the threads to trip over each other concurrency issues can be hard to reproduce consistentlymaking them hard to debug multithreaded programming is its own wide subject and beyond the scope of this book what you have to keep in mind is thisto avoid concurrency issuesnever let multiple threads read or write the same variables when you create new thread objectmake sure its target function uses only local variables in that function this will avoid hard-to-debug concurrency issues in your programs note beginner' tutorial on multithreaded programming is available at nostarch com/automatestuff projectmultithreaded xkcd downloader in you wrote program that downloaded all of the xkcd comic strips from the xkcd website this was single-threaded programit downloaded one comic at time much of the program' running time was spent establishing the network connection to begin the download and writing the downloaded images to the hard drive if you have broadband internet connectionyour single-threaded program wasn' fully utilizing the available bandwidth multithreaded program that has some threads downloading comics while others are establishing connections and writing the comic image files to disk uses your internet connection more efficiently and downloads the collection of comics more quickly open new file editor tab and save it as threadeddownloadxkcd py you will modify this program to add multithreading the completely modified source code is available to download from step modify the program to use function this program will mostly be the same downloading code from so 'll skip the explanation for the requests and beautiful soup code the main changes you need to make are importing the threading module and making downloadxkcd(functionwhich takes starting and ending comic numbers as parameters keeping timescheduling tasksand launching programs